Merge tag 'rtc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 May 2023 18:14:12 +0000 (11:14 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 1 May 2023 18:14:12 +0000 (11:14 -0700)
Pull RTC updates from Alexandre Belloni:
 "Not much this cycle, there is the conversion to remove_new and many
  small fixes in drivers:

  Subsystem:
   - Convert to platform remove callback returning void

  Drivers:
   - meson-vrtc: fix a firmware display issue"

* tag 'rtc-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (53 commits)
  rtc: armada38x: use devm_platform_ioremap_resource_byname()
  rtc: sunplus: use devm_platform_ioremap_resource_byname()
  rtc: jz4740: Make sure clock provider gets removed
  rtc: k3: handle errors while enabling wake irq
  rtc: meson-vrtc: Use ktime_get_real_ts64() to get the current time
  dt-bindings: rtc: Drop unneeded quotes
  rtc: pcf8523: remove unnecessary OR operation
  rtc: pcf8523: fix coding-style issues
  rtc: ds1390: mark OF related data as maybe unused
  rtc: omap: include header for omap_rtc_power_off_program prototype
  rtc: sun6i: Use of_property_present() for testing DT property presence
  rtc: mpfs: convert SOC_MICROCHIP_POLARFIRE to ARCH_MICROCHIP_POLARFIRE
  rtc: zynqmp: Convert to platform remove callback returning void
  rtc: xgene: Convert to platform remove callback returning void
  rtc: wm8350: Convert to platform remove callback returning void
  rtc: vt8500: Convert to platform remove callback returning void
  rtc: twl: Convert to platform remove callback returning void
  rtc: tps6586x: Convert to platform remove callback returning void
  rtc: tegra: Convert to platform remove callback returning void
  rtc: sunplus: Convert to platform remove callback returning void
  ...

65 files changed:
Documentation/devicetree/bindings/rtc/allwinner,sun4i-a10-rtc.yaml
Documentation/devicetree/bindings/rtc/allwinner,sun6i-a31-rtc.yaml
Documentation/devicetree/bindings/rtc/atmel,at91rm9200-rtc.yaml
Documentation/devicetree/bindings/rtc/atmel,at91sam9260-rtt.yaml
Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml
Documentation/devicetree/bindings/rtc/faraday,ftrtc010.yaml
Documentation/devicetree/bindings/rtc/microcrystal,rv3032.yaml
Documentation/devicetree/bindings/rtc/mstar,msc313-rtc.yaml
Documentation/devicetree/bindings/rtc/nuvoton,nct3018y.yaml
Documentation/devicetree/bindings/rtc/nxp,pcf2127.yaml
Documentation/devicetree/bindings/rtc/rtc-mxc.yaml
Documentation/devicetree/bindings/rtc/rtc-mxc_v2.yaml
Documentation/devicetree/bindings/rtc/sa1100-rtc.yaml
Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
Documentation/devicetree/bindings/rtc/ti,k3-rtc.yaml
Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
drivers/rtc/Kconfig
drivers/rtc/rtc-88pm80x.c
drivers/rtc/rtc-88pm860x.c
drivers/rtc/rtc-ab8500.c
drivers/rtc/rtc-ac100.c
drivers/rtc/rtc-armada38x.c
drivers/rtc/rtc-asm9260.c
drivers/rtc/rtc-at91sam9.c
drivers/rtc/rtc-brcmstb-waketimer.c
drivers/rtc/rtc-cadence.c
drivers/rtc/rtc-cmos.c
drivers/rtc/rtc-cros-ec.c
drivers/rtc/rtc-ds1390.c
drivers/rtc/rtc-ds1685.c
drivers/rtc/rtc-ftrtc010.c
drivers/rtc/rtc-hid-sensor-time.c
drivers/rtc/rtc-jz4740.c
drivers/rtc/rtc-lpc24xx.c
drivers/rtc/rtc-max77686.c
drivers/rtc/rtc-mc13xxx.c
drivers/rtc/rtc-meson-vrtc.c
drivers/rtc/rtc-mpc5121.c
drivers/rtc/rtc-mpfs.c
drivers/rtc/rtc-mt7622.c
drivers/rtc/rtc-mxc_v2.c
drivers/rtc/rtc-omap.c
drivers/rtc/rtc-palmas.c
drivers/rtc/rtc-pcf50633.c
drivers/rtc/rtc-pcf8523.c
drivers/rtc/rtc-pic32.c
drivers/rtc/rtc-pm8xxx.c
drivers/rtc/rtc-rc5t583.c
drivers/rtc/rtc-rtd119x.c
drivers/rtc/rtc-rzn1.c
drivers/rtc/rtc-s3c.c
drivers/rtc/rtc-sa1100.c
drivers/rtc/rtc-spear.c
drivers/rtc/rtc-stm32.c
drivers/rtc/rtc-stmp3xxx.c
drivers/rtc/rtc-sun6i.c
drivers/rtc/rtc-sunplus.c
drivers/rtc/rtc-tegra.c
drivers/rtc/rtc-ti-k3.c
drivers/rtc/rtc-tps6586x.c
drivers/rtc/rtc-twl.c
drivers/rtc/rtc-vt8500.c
drivers/rtc/rtc-wm8350.c
drivers/rtc/rtc-xgene.c
drivers/rtc/rtc-zynqmp.c

index dede49431733921c16b68c9aefe6603bcf438eac..054e1e397fc882b875220fb0788eb3154a2cee29 100644 (file)
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Allwinner A10 RTC
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 maintainers:
   - Chen-Yu Tsai <wens@csie.org>
index 04947e166cef3228896a77716ee21236bb41c4ad..4531eec568a6578b19a85594e9ebb8458825bb47 100644 (file)
@@ -61,7 +61,7 @@ properties:
         - the Internal Oscillator, at index 2.
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
   - if:
       properties:
         compatible:
index 0e5f0fcc26b018036d02bfd06136d45256c0e693..4d2bef15fb7abca85c125a9108b00979213ab05a 100644 (file)
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Atmel AT91 RTC
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 maintainers:
   - Alexandre Belloni <alexandre.belloni@bootlin.com>
index b5cd20e89daf240f8276557f5b91aa98aef5e988..b80b85c394ac5cd5281e86f4bac400865e41292d 100644 (file)
@@ -8,7 +8,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Atmel AT91 RTT
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 maintainers:
   - Alexandre Belloni <alexandre.belloni@bootlin.com>
index c6c57636c729e305b230de91bf7c1416a80fbda5..c5e5c5aec74e654a1882ddf728a9abcafd84fb76 100644 (file)
@@ -15,7 +15,7 @@ description:
   optionally generate RTC alarm interrupts.
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 properties:
   compatible:
index 056d42daae06da9a7dbafef5a3e65dcc56dc51a7..b1c1a0e21318817ade37308152fefcb58313e099 100644 (file)
@@ -38,8 +38,8 @@ properties:
 
   clock-names:
     items:
-      - const: "PCLK"
-      - const: "EXTCLK"
+      - const: PCLK
+      - const: EXTCLK
 
 required:
   - compatible
index dd6eebf06ea6076111a3cf36785cf90040eeaa99..27a9de10f0af39c1ec1fe96fd565585eab2ae33b 100644 (file)
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Microchip RV-3032 RTC
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 maintainers:
   - Alexandre Belloni <alexandre.belloni@bootlin.com>
index 585c185d1eb36ceabe1f060a12ff037fbdf1c831..af4a31cd0954cd864fd9fceab2b11174328aafa6 100644 (file)
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Mstar MSC313e RTC
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 maintainers:
   - Daniel Palmer <daniel@0x0f.com>
index 7a1857f5caa807e0ab13661e6369607b2eb7e301..4f9b5604acd93cde8606fe61d8960c7e2ca01b89 100644 (file)
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: NUVOTON NCT3018Y Real Time Clock
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 maintainers:
   - Medad CChien <ctcchien@nuvoton.com>
index a1148eb22c2450e9091e301eb9f1a42a2deefdc8..bcb2300276227eee0d391fe0c6e72c5b1fb98d78 100644 (file)
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: NXP PCF2127 Real Time Clock
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 maintainers:
   - Alexandre Belloni <alexandre.belloni@bootlin.com>
index 4f263fa6fd0de658176a85eea9fad02dca31ae6f..a14b52178c4b05019f3c8c37fb21d0a738d41e4a 100644 (file)
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: Real Time Clock of the i.MX SoCs
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 maintainers:
   - Philippe Reynes <tremyfr@gmail.com>
index 2d1a30663d72a985417498a52e7905db7a222292..e50131c26dc68c8d6a1fddfdd87e6dafc0ee88c1 100644 (file)
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
 title: i.MX53 Secure Real Time Clock (SRTC)
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 maintainers:
   - Patrick Bruenn <p.bruenn@beckhoff.com>
index b04b87ef6f33418b1dc9f185a1fa50265db967e2..a16c355dcd11320c050804878ddcfcee9e8bd653 100644 (file)
@@ -34,8 +34,8 @@ properties:
 
   interrupt-names:
     items:
-      - const: 'rtc 1Hz'
-      - const: 'rtc alarm'
+      - const: rtc 1Hz
+      - const: rtc alarm
 
 required:
   - compatible
index 9e66ed33cda481aa8d5b6e60b629f09f27433f0e..4703083d1f11fb1c3863ab06a010ce1f8fd5661e 100644 (file)
@@ -32,7 +32,7 @@ properties:
     maxItems: 1
 
   st,syscfg:
-    $ref: "/schemas/types.yaml#/definitions/phandle-array"
+    $ref: /schemas/types.yaml#/definitions/phandle-array
     items:
       minItems: 3
       maxItems: 3
index d995ef04a6ebc719556fc58dd9961cbf15305f08..df5b4f77f6fbc5ba8ea188322f582664407b4ff7 100644 (file)
@@ -13,7 +13,7 @@ description: |
   This RTC appears in the AM62x family of SoCs.
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 properties:
   compatible:
index eb75861c28c32d44e8c1c729e3185f1dbc99a5b8..a3603e638c3739dd9d365a6809c4b27aa711c4c9 100644 (file)
@@ -15,7 +15,7 @@ description: |
   possibly an interrupt line.
 
 allOf:
-  - $ref: "rtc.yaml#"
+  - $ref: rtc.yaml#
 
 properties:
   compatible:
index 5a71579af0a14e032a36139ace3bc1e4946aa891..75387240861564405577aaf05c9150ef6aa91e54 100644 (file)
@@ -1970,7 +1970,7 @@ config RTC_DRV_MSC313
 
 config RTC_DRV_POLARFIRE_SOC
        tristate "Microchip PolarFire SoC built-in RTC"
-       depends on SOC_MICROCHIP_POLARFIRE
+       depends on ARCH_MICROCHIP_POLARFIRE
        help
          If you say yes here you will get support for the
          built-in RTC on Polarfire SoC.
index 6a3f44cf6ebe593b24c3c364a6e7a94a6bf7a0ce..f40cc06b097973a0116b53887798110cdcb81bed 100644 (file)
@@ -317,11 +317,10 @@ out:
        return ret;
 }
 
-static int pm80x_rtc_remove(struct platform_device *pdev)
+static void pm80x_rtc_remove(struct platform_device *pdev)
 {
        struct pm80x_rtc_info *info = platform_get_drvdata(pdev);
        pm80x_free_irq(info->chip, info->irq, info);
-       return 0;
 }
 
 static struct platform_driver pm80x_rtc_driver = {
@@ -330,7 +329,7 @@ static struct platform_driver pm80x_rtc_driver = {
                   .pm = &pm80x_rtc_pm_ops,
                   },
        .probe = pm80x_rtc_probe,
-       .remove = pm80x_rtc_remove,
+       .remove_new = pm80x_rtc_remove,
 };
 
 module_platform_driver(pm80x_rtc_driver);
index 2c809a1a445e88e1ff4a731a5d23b0f52efeb93d..0f124ed5b3e56b8c63ebd11de2fdf50195250781 100644 (file)
@@ -331,7 +331,7 @@ static int pm860x_rtc_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int pm860x_rtc_remove(struct platform_device *pdev)
+static void pm860x_rtc_remove(struct platform_device *pdev)
 {
        struct pm860x_rtc_info *info = platform_get_drvdata(pdev);
 
@@ -340,8 +340,6 @@ static int pm860x_rtc_remove(struct platform_device *pdev)
        /* disable measurement */
        pm860x_set_bits(info->i2c, PM8607_MEAS_EN2, MEAS2_VRTC, 0);
 #endif /* VRTC_CALIBRATION */
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -373,7 +371,7 @@ static struct platform_driver pm860x_rtc_driver = {
                .pm     = &pm860x_rtc_pm_ops,
        },
        .probe          = pm860x_rtc_probe,
-       .remove         = pm860x_rtc_remove,
+       .remove_new     = pm860x_rtc_remove,
 };
 
 module_platform_driver(pm860x_rtc_driver);
index ea33e149d5459055cd3756ad846f9b33c1ffcfb6..75bb2ac9005c26c8737ce87ca89b8235e5d1f52c 100644 (file)
@@ -392,12 +392,10 @@ static int ab8500_rtc_probe(struct platform_device *pdev)
        return devm_rtc_register_device(rtc);
 }
 
-static int ab8500_rtc_remove(struct platform_device *pdev)
+static void ab8500_rtc_remove(struct platform_device *pdev)
 {
        dev_pm_clear_wake_irq(&pdev->dev);
        device_init_wakeup(&pdev->dev, false);
-
-       return 0;
 }
 
 static struct platform_driver ab8500_rtc_driver = {
@@ -405,7 +403,7 @@ static struct platform_driver ab8500_rtc_driver = {
                .name = "ab8500-rtc",
        },
        .probe  = ab8500_rtc_probe,
-       .remove = ab8500_rtc_remove,
+       .remove_new = ab8500_rtc_remove,
        .id_table = ab85xx_rtc_ids,
 };
 
index 66783cb5e711312939450c3a803549c20123aaa7..eaf2c9ab96619c1baad80711112f30ce9a94c22d 100644 (file)
@@ -613,13 +613,11 @@ static int ac100_rtc_probe(struct platform_device *pdev)
        return devm_rtc_register_device(chip->rtc);
 }
 
-static int ac100_rtc_remove(struct platform_device *pdev)
+static void ac100_rtc_remove(struct platform_device *pdev)
 {
        struct ac100_rtc_dev *chip = platform_get_drvdata(pdev);
 
        ac100_rtc_unregister_clks(chip);
-
-       return 0;
 }
 
 static const struct of_device_id ac100_rtc_match[] = {
@@ -630,7 +628,7 @@ MODULE_DEVICE_TABLE(of, ac100_rtc_match);
 
 static struct platform_driver ac100_rtc_driver = {
        .probe          = ac100_rtc_probe,
-       .remove         = ac100_rtc_remove,
+       .remove_new     = ac100_rtc_remove,
        .driver         = {
                .name           = "ac100-rtc",
                .of_match_table = of_match_ptr(ac100_rtc_match),
index cc542e6b1d5b029f11ab5a605145a7e6998a7a9a..b4139c200676613bd7dbc9a7feb44fea8a4409a8 100644 (file)
@@ -491,7 +491,6 @@ MODULE_DEVICE_TABLE(of, armada38x_rtc_of_match_table);
 
 static __init int armada38x_rtc_probe(struct platform_device *pdev)
 {
-       struct resource *res;
        struct armada38x_rtc *rtc;
 
        rtc = devm_kzalloc(&pdev->dev, sizeof(struct armada38x_rtc),
@@ -508,12 +507,10 @@ static __init int armada38x_rtc_probe(struct platform_device *pdev)
 
        spin_lock_init(&rtc->lock);
 
-       res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rtc");
-       rtc->regs = devm_ioremap_resource(&pdev->dev, res);
+       rtc->regs = devm_platform_ioremap_resource_byname(pdev, "rtc");
        if (IS_ERR(rtc->regs))
                return PTR_ERR(rtc->regs);
-       res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "rtc-soc");
-       rtc->regs_soc = devm_ioremap_resource(&pdev->dev, res);
+       rtc->regs_soc = devm_platform_ioremap_resource_byname(pdev, "rtc-soc");
        if (IS_ERR(rtc->regs_soc))
                return PTR_ERR(rtc->regs_soc);
 
index de795e489f719c32515d083cebee479ce4d872d3..a83b47e0d8f5328e3231d81bbe58131413ab304d 100644 (file)
@@ -308,14 +308,13 @@ err_return:
        return ret;
 }
 
-static int asm9260_rtc_remove(struct platform_device *pdev)
+static void asm9260_rtc_remove(struct platform_device *pdev)
 {
        struct asm9260_rtc_priv *priv = platform_get_drvdata(pdev);
 
        /* Disable alarm matching */
        iowrite32(BM_AMR_OFF, priv->iobase + HW_AMR);
        clk_disable_unprepare(priv->clk);
-       return 0;
 }
 
 static const struct of_device_id asm9260_dt_ids[] = {
@@ -326,7 +325,7 @@ MODULE_DEVICE_TABLE(of, asm9260_dt_ids);
 
 static struct platform_driver asm9260_rtc_driver = {
        .probe          = asm9260_rtc_probe,
-       .remove         = asm9260_rtc_remove,
+       .remove_new     = asm9260_rtc_remove,
        .driver         = {
                .name   = "asm9260-rtc",
                .of_match_table = asm9260_dt_ids,
index b7b5ea1a4e6726775ce6d2302bcb2cbe566894a9..610f27dfc462dad34ee65e6e81c2e750af8bc2d8 100644 (file)
@@ -442,7 +442,7 @@ err_clk:
 /*
  * Disable and remove the RTC driver
  */
-static int at91_rtc_remove(struct platform_device *pdev)
+static void at91_rtc_remove(struct platform_device *pdev)
 {
        struct sam9_rtc *rtc = platform_get_drvdata(pdev);
        u32             mr = rtt_readl(rtc, MR);
@@ -451,8 +451,6 @@ static int at91_rtc_remove(struct platform_device *pdev)
        rtt_writel(rtc, MR, mr & ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN));
 
        clk_disable_unprepare(rtc->sclk);
-
-       return 0;
 }
 
 static void at91_rtc_shutdown(struct platform_device *pdev)
@@ -531,7 +529,7 @@ MODULE_DEVICE_TABLE(of, at91_rtc_dt_ids);
 
 static struct platform_driver at91_rtc_driver = {
        .probe          = at91_rtc_probe,
-       .remove         = at91_rtc_remove,
+       .remove_new     = at91_rtc_remove,
        .shutdown       = at91_rtc_shutdown,
        .driver         = {
                .name   = "rtc-at91sam9",
index 1efa81cecc273fb3046b7e365c1d130a7a1f679b..3cdc015692ca639738c61943853c88b3782f0e83 100644 (file)
@@ -336,14 +336,12 @@ err_clk:
        return ret;
 }
 
-static int brcmstb_waketmr_remove(struct platform_device *pdev)
+static void brcmstb_waketmr_remove(struct platform_device *pdev)
 {
        struct brcmstb_waketmr *timer = dev_get_drvdata(&pdev->dev);
 
        unregister_reboot_notifier(&timer->reboot_notifier);
        clk_disable_unprepare(timer->clk);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -382,7 +380,7 @@ static const __maybe_unused struct of_device_id brcmstb_waketmr_of_match[] = {
 
 static struct platform_driver brcmstb_waketmr_driver = {
        .probe                  = brcmstb_waketmr_probe,
-       .remove                 = brcmstb_waketmr_remove,
+       .remove_new             = brcmstb_waketmr_remove,
        .driver = {
                .name           = "brcmstb-waketimer",
                .pm             = &brcmstb_waketmr_pm_ops,
index 1edf7f16d73af5611f56fdbd4eb850d13caf95f6..4ca60b51983650f32c2edc4fb7ded99a7b51400a 100644 (file)
@@ -354,7 +354,7 @@ err_disable_pclk:
        return ret;
 }
 
-static int cdns_rtc_remove(struct platform_device *pdev)
+static void cdns_rtc_remove(struct platform_device *pdev)
 {
        struct cdns_rtc *crtc = platform_get_drvdata(pdev);
 
@@ -363,8 +363,6 @@ static int cdns_rtc_remove(struct platform_device *pdev)
 
        clk_disable_unprepare(crtc->pclk);
        clk_disable_unprepare(crtc->ref_clk);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -404,7 +402,7 @@ static struct platform_driver cdns_rtc_driver = {
                .pm = &cdns_rtc_pm_ops,
        },
        .probe = cdns_rtc_probe,
-       .remove = cdns_rtc_remove,
+       .remove_new = cdns_rtc_remove,
 };
 module_platform_driver(cdns_rtc_driver);
 
index 00e2ca7374ecfb2579ed14445434d9cd6c626fe5..c9416fe8542d7ea2800250c5d17d30f86e210bd4 100644 (file)
@@ -1489,10 +1489,9 @@ static int __init cmos_platform_probe(struct platform_device *pdev)
        return cmos_do_probe(&pdev->dev, resource, irq);
 }
 
-static int cmos_platform_remove(struct platform_device *pdev)
+static void cmos_platform_remove(struct platform_device *pdev)
 {
        cmos_do_remove(&pdev->dev);
-       return 0;
 }
 
 static void cmos_platform_shutdown(struct platform_device *pdev)
@@ -1514,7 +1513,7 @@ static void cmos_platform_shutdown(struct platform_device *pdev)
 MODULE_ALIAS("platform:rtc_cmos");
 
 static struct platform_driver cmos_platform_driver = {
-       .remove         = cmos_platform_remove,
+       .remove_new     = cmos_platform_remove,
        .shutdown       = cmos_platform_shutdown,
        .driver = {
                .name           = driver_name,
index a3ec066d8066775730871ac144218f05010e15d9..998ab8606f0b61ed84fd6a50ec36a219f5627109 100644 (file)
@@ -371,7 +371,7 @@ static int cros_ec_rtc_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int cros_ec_rtc_remove(struct platform_device *pdev)
+static void cros_ec_rtc_remove(struct platform_device *pdev)
 {
        struct cros_ec_rtc *cros_ec_rtc = platform_get_drvdata(pdev);
        struct device *dev = &pdev->dev;
@@ -382,13 +382,11 @@ static int cros_ec_rtc_remove(struct platform_device *pdev)
                                &cros_ec_rtc->notifier);
        if (ret)
                dev_err(dev, "failed to unregister notifier\n");
-
-       return 0;
 }
 
 static struct platform_driver cros_ec_rtc_driver = {
        .probe = cros_ec_rtc_probe,
-       .remove = cros_ec_rtc_remove,
+       .remove_new = cros_ec_rtc_remove,
        .driver = {
                .name = DRV_NAME,
                .pm = &cros_ec_rtc_pm_ops,
index 93ce72b9ae59e3fca919398db024fae038de3c06..f46428ca77cc42cf56e002d4807410a66364c04e 100644 (file)
@@ -213,7 +213,7 @@ static int ds1390_probe(struct spi_device *spi)
        return res;
 }
 
-static const struct of_device_id ds1390_of_match[] = {
+static const struct of_device_id ds1390_of_match[] __maybe_unused = {
        { .compatible = "dallas,ds1390" },
        {}
 };
index 5db9c737c022f252d629e7335133351f6bb57471..0f707be0eb87fa96fbe1e27867e42895f8058875 100644 (file)
@@ -1322,7 +1322,7 @@ ds1685_rtc_probe(struct platform_device *pdev)
  * ds1685_rtc_remove - removes rtc driver.
  * @pdev: pointer to platform_device structure.
  */
-static int
+static void
 ds1685_rtc_remove(struct platform_device *pdev)
 {
        struct ds1685_priv *rtc = platform_get_drvdata(pdev);
@@ -1344,8 +1344,6 @@ ds1685_rtc_remove(struct platform_device *pdev)
        rtc->write(rtc, RTC_EXT_CTRL_4A,
                   (rtc->read(rtc, RTC_EXT_CTRL_4A) &
                    ~(RTC_CTRL_4A_RWK_MASK)));
-
-       return 0;
 }
 
 /*
@@ -1356,7 +1354,7 @@ static struct platform_driver ds1685_rtc_driver = {
                .name   = "rtc-ds1685",
        },
        .probe          = ds1685_rtc_probe,
-       .remove         = ds1685_rtc_remove,
+       .remove_new     = ds1685_rtc_remove,
 };
 module_platform_driver(ds1685_rtc_driver);
 /* ----------------------------------------------------------------------- */
index 25c6e7d9570f017ed2bcae9683b880984d2c0cfe..8bfe7378f6533fdbf64725be78a77ad60b69e692 100644 (file)
@@ -191,7 +191,7 @@ err_disable_pclk:
        return ret;
 }
 
-static int ftrtc010_rtc_remove(struct platform_device *pdev)
+static void ftrtc010_rtc_remove(struct platform_device *pdev)
 {
        struct ftrtc010_rtc *rtc = platform_get_drvdata(pdev);
 
@@ -199,8 +199,6 @@ static int ftrtc010_rtc_remove(struct platform_device *pdev)
                clk_disable_unprepare(rtc->extclk);
        if (!IS_ERR(rtc->pclk))
                clk_disable_unprepare(rtc->pclk);
-
-       return 0;
 }
 
 static const struct of_device_id ftrtc010_rtc_dt_match[] = {
@@ -216,7 +214,7 @@ static struct platform_driver ftrtc010_rtc_driver = {
                .of_match_table = ftrtc010_rtc_dt_match,
        },
        .probe          = ftrtc010_rtc_probe,
-       .remove         = ftrtc010_rtc_remove,
+       .remove_new     = ftrtc010_rtc_remove,
 };
 
 module_platform_driver_probe(ftrtc010_rtc_driver, ftrtc010_rtc_probe);
index 16fdefafec5d33270de9495e92aa018322511829..b81cea505ee93fdc1eba7c1cfc8108f1dc5acc9e 100644 (file)
@@ -296,14 +296,12 @@ err_open:
        return ret;
 }
 
-static int hid_time_remove(struct platform_device *pdev)
+static void hid_time_remove(struct platform_device *pdev)
 {
        struct hid_sensor_hub_device *hsdev = dev_get_platdata(&pdev->dev);
 
        sensor_hub_device_close(hsdev);
        sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_TIME);
-
-       return 0;
 }
 
 static const struct platform_device_id hid_time_ids[] = {
@@ -321,7 +319,7 @@ static struct platform_driver hid_time_platform_driver = {
                .name   = KBUILD_MODNAME,
        },
        .probe          = hid_time_probe,
-       .remove         = hid_time_remove,
+       .remove_new     = hid_time_remove,
 };
 module_platform_driver(hid_time_platform_driver);
 
index 59d279e3e6f5bb2c709d87c8cb8fed9bb9d55161..36453b008139b3d8897c8df47c087d794268f650 100644 (file)
@@ -414,7 +414,8 @@ static int jz4740_rtc_probe(struct platform_device *pdev)
                        return dev_err_probe(dev, ret,
                                             "Unable to register clk32k clock\n");
 
-               ret = of_clk_add_hw_provider(np, of_clk_hw_simple_get, &rtc->clk32k);
+               ret = devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get,
+                                                 &rtc->clk32k);
                if (ret)
                        return dev_err_probe(dev, ret,
                                             "Unable to register clk32k clock provider\n");
index eec881a81067886d85d6114b3e555adaec4776f6..a4612e543f35348e3c1c2c98bb411c9e2dfc3eb2 100644 (file)
@@ -264,7 +264,7 @@ disable_rtc_clk:
        return ret;
 }
 
-static int lpc24xx_rtc_remove(struct platform_device *pdev)
+static void lpc24xx_rtc_remove(struct platform_device *pdev)
 {
        struct lpc24xx_rtc *rtc = platform_get_drvdata(pdev);
 
@@ -276,8 +276,6 @@ static int lpc24xx_rtc_remove(struct platform_device *pdev)
 
        clk_disable_unprepare(rtc->clk_rtc);
        clk_disable_unprepare(rtc->clk_reg);
-
-       return 0;
 }
 
 static const struct of_device_id lpc24xx_rtc_match[] = {
@@ -288,7 +286,7 @@ MODULE_DEVICE_TABLE(of, lpc24xx_rtc_match);
 
 static struct platform_driver lpc24xx_rtc_driver = {
        .probe  = lpc24xx_rtc_probe,
-       .remove = lpc24xx_rtc_remove,
+       .remove_new = lpc24xx_rtc_remove,
        .driver = {
                .name = "lpc24xx-rtc",
                .of_match_table = lpc24xx_rtc_match,
index b0250d91fb00b39549cdc989a8c65a6f4691dcc4..35a6021d9ba4c2f940f2027ced9b4e429b1f9720 100644 (file)
@@ -806,14 +806,12 @@ err_rtc:
        return ret;
 }
 
-static int max77686_rtc_remove(struct platform_device *pdev)
+static void max77686_rtc_remove(struct platform_device *pdev)
 {
        struct max77686_rtc_info *info = platform_get_drvdata(pdev);
 
        free_irq(info->virq, info);
        regmap_del_irq_chip(info->rtc_irq, info->rtc_irq_data);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -877,7 +875,7 @@ static struct platform_driver max77686_rtc_driver = {
                .pm     = &max77686_rtc_pm_ops,
        },
        .probe          = max77686_rtc_probe,
-       .remove         = max77686_rtc_remove,
+       .remove_new     = max77686_rtc_remove,
        .id_table       = rtc_id,
 };
 
index d4234e78497e0c1c7be0fd585f6aedaa187db112..763a42f422eb27b3fe171ba4c38243da7d3ff6e4 100644 (file)
@@ -324,7 +324,7 @@ err_irq_request:
        return ret;
 }
 
-static int mc13xxx_rtc_remove(struct platform_device *pdev)
+static void mc13xxx_rtc_remove(struct platform_device *pdev)
 {
        struct mc13xxx_rtc *priv = platform_get_drvdata(pdev);
 
@@ -334,8 +334,6 @@ static int mc13xxx_rtc_remove(struct platform_device *pdev)
        mc13xxx_irq_free(priv->mc13xxx, MC13XXX_IRQ_RTCRST, priv);
 
        mc13xxx_unlock(priv->mc13xxx);
-
-       return 0;
 }
 
 static const struct platform_device_id mc13xxx_rtc_idtable[] = {
@@ -352,7 +350,7 @@ MODULE_DEVICE_TABLE(platform, mc13xxx_rtc_idtable);
 
 static struct platform_driver mc13xxx_rtc_driver = {
        .id_table = mc13xxx_rtc_idtable,
-       .remove = mc13xxx_rtc_remove,
+       .remove_new = mc13xxx_rtc_remove,
        .driver = {
                .name = DRIVER_NAME,
        },
index 1463c86215615a6b27b4b91ed33db659cce83054..648fa362ec447b0072e3f56fa8efd38e234d6e97 100644 (file)
@@ -23,7 +23,7 @@ static int meson_vrtc_read_time(struct device *dev, struct rtc_time *tm)
        struct timespec64 time;
 
        dev_dbg(dev, "%s\n", __func__);
-       ktime_get_raw_ts64(&time);
+       ktime_get_real_ts64(&time);
        rtc_time64_to_tm(time.tv_sec, tm);
 
        return 0;
@@ -96,7 +96,7 @@ static int __maybe_unused meson_vrtc_suspend(struct device *dev)
                long alarm_secs;
                struct timespec64 time;
 
-               ktime_get_raw_ts64(&time);
+               ktime_get_real_ts64(&time);
                local_time = time.tv_sec;
 
                dev_dbg(dev, "alarm_time = %lus, local_time=%lus\n",
index 6d7656a75cae50cb8cf90071492201a5acc8bb2a..07df43e4c4d06cf089834209a9ea602a1f64e2df 100644 (file)
@@ -372,7 +372,7 @@ out_dispose:
        return err;
 }
 
-static int mpc5121_rtc_remove(struct platform_device *op)
+static void mpc5121_rtc_remove(struct platform_device *op)
 {
        struct mpc5121_rtc_data *rtc = platform_get_drvdata(op);
        struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
@@ -383,8 +383,6 @@ static int mpc5121_rtc_remove(struct platform_device *op)
 
        irq_dispose_mapping(rtc->irq);
        irq_dispose_mapping(rtc->irq_periodic);
-
-       return 0;
 }
 
 #ifdef CONFIG_OF
@@ -402,7 +400,7 @@ static struct platform_driver mpc5121_rtc_driver = {
                .of_match_table = of_match_ptr(mpc5121_rtc_match),
        },
        .probe = mpc5121_rtc_probe,
-       .remove = mpc5121_rtc_remove,
+       .remove_new = mpc5121_rtc_remove,
 };
 
 module_platform_driver(mpc5121_rtc_driver);
index 2a479d44f1981e282bb422bdc07f4c4d89bc93f7..5b96a6d39210cff48c09ece297a80ccf5a208922 100644 (file)
@@ -274,11 +274,9 @@ static int mpfs_rtc_probe(struct platform_device *pdev)
        return devm_rtc_register_device(rtcdev->rtc);
 }
 
-static int mpfs_rtc_remove(struct platform_device *pdev)
+static void mpfs_rtc_remove(struct platform_device *pdev)
 {
        dev_pm_clear_wake_irq(&pdev->dev);
-
-       return 0;
 }
 
 static const struct of_device_id mpfs_rtc_of_match[] = {
@@ -290,7 +288,7 @@ MODULE_DEVICE_TABLE(of, mpfs_rtc_of_match);
 
 static struct platform_driver mpfs_rtc_driver = {
        .probe = mpfs_rtc_probe,
-       .remove = mpfs_rtc_remove,
+       .remove_new = mpfs_rtc_remove,
        .driver = {
                .name = "mpfs_rtc",
                .of_match_table = mpfs_rtc_of_match,
index f1e3563948142fbd98a0ccda492222f66afa1519..81857a457c326ad5364e6f56de576a77417d1296 100644 (file)
@@ -357,13 +357,11 @@ err:
        return ret;
 }
 
-static int mtk_rtc_remove(struct platform_device *pdev)
+static void mtk_rtc_remove(struct platform_device *pdev)
 {
        struct mtk_rtc *hw = platform_get_drvdata(pdev);
 
        clk_disable_unprepare(hw->clk);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -396,7 +394,7 @@ static SIMPLE_DEV_PM_OPS(mtk_rtc_pm_ops, mtk_rtc_suspend, mtk_rtc_resume);
 
 static struct platform_driver mtk_rtc_driver = {
        .probe  = mtk_rtc_probe,
-       .remove = mtk_rtc_remove,
+       .remove_new = mtk_rtc_remove,
        .driver = {
                .name = MTK_RTC_DEV,
                .of_match_table = mtk_rtc_match,
index f6d2ad91ff7a9a9980d65786bb6125e538467600..6934bce4b29fd56239fee3055ac9dbacfa012c10 100644 (file)
@@ -362,12 +362,11 @@ static int mxc_rtc_probe(struct platform_device *pdev)
        return ret;
 }
 
-static int mxc_rtc_remove(struct platform_device *pdev)
+static void mxc_rtc_remove(struct platform_device *pdev)
 {
        struct mxc_rtc_data *pdata = platform_get_drvdata(pdev);
 
        clk_disable_unprepare(pdata->clk);
-       return 0;
 }
 
 static const struct of_device_id mxc_ids[] = {
@@ -382,7 +381,7 @@ static struct platform_driver mxc_rtc_driver = {
                .of_match_table = mxc_ids,
        },
        .probe = mxc_rtc_probe,
-       .remove = mxc_rtc_remove,
+       .remove_new = mxc_rtc_remove,
 };
 
 module_platform_driver(mxc_rtc_driver);
index 4d4f3b1a73093f4e2c6037b2fd497791b5eac09e..8ae4d7824ec9f7b77fd2d8511743ca93625b857a 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/rtc.h>
+#include <linux/rtc/rtc-omap.h>
 
 /*
  * The OMAP RTC is a year/month/day/hours/minutes/seconds BCD clock
@@ -910,7 +911,7 @@ err:
        return ret;
 }
 
-static int omap_rtc_remove(struct platform_device *pdev)
+static void omap_rtc_remove(struct platform_device *pdev)
 {
        struct omap_rtc *rtc = platform_get_drvdata(pdev);
        u8 reg;
@@ -941,8 +942,6 @@ static int omap_rtc_remove(struct platform_device *pdev)
        /* Disable the clock/module */
        pm_runtime_put_sync(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
-
-       return 0;
 }
 
 static int __maybe_unused omap_rtc_suspend(struct device *dev)
@@ -1017,7 +1016,7 @@ static void omap_rtc_shutdown(struct platform_device *pdev)
 
 static struct platform_driver omap_rtc_driver = {
        .probe          = omap_rtc_probe,
-       .remove         = omap_rtc_remove,
+       .remove_new     = omap_rtc_remove,
        .shutdown       = omap_rtc_shutdown,
        .driver         = {
                .name   = "omap_rtc",
index 67571f7f0bbcebd9137fb731ef2bd770c6aff2f2..6971e47c6021eea935c2a8a811e03e6ec8b95802 100644 (file)
@@ -308,10 +308,9 @@ static int palmas_rtc_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int palmas_rtc_remove(struct platform_device *pdev)
+static void palmas_rtc_remove(struct platform_device *pdev)
 {
        palmas_rtc_alarm_irq_enable(&pdev->dev, 0);
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -347,7 +346,7 @@ MODULE_DEVICE_TABLE(of, of_palmas_rtc_match);
 
 static struct platform_driver palmas_rtc_driver = {
        .probe          = palmas_rtc_probe,
-       .remove         = palmas_rtc_remove,
+       .remove_new     = palmas_rtc_remove,
        .driver         = {
                .name   = "palmas-rtc",
                .pm     = &palmas_rtc_pm_ops,
index 48951a16d65dc2cffeaeffb8d4d661461351af92..23edd11aa40c5529aa1d4b69f06ad9946f3b31ad 100644 (file)
@@ -260,14 +260,12 @@ static int pcf50633_rtc_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int pcf50633_rtc_remove(struct platform_device *pdev)
+static void pcf50633_rtc_remove(struct platform_device *pdev)
 {
        struct pcf50633_rtc *rtc;
 
        rtc = platform_get_drvdata(pdev);
        pcf50633_free_irq(rtc->pcf, PCF50633_IRQ_ALARM);
-
-       return 0;
 }
 
 static struct platform_driver pcf50633_rtc_driver = {
@@ -275,7 +273,7 @@ static struct platform_driver pcf50633_rtc_driver = {
                .name = "pcf50633-rtc",
        },
        .probe = pcf50633_rtc_probe,
-       .remove = pcf50633_rtc_remove,
+       .remove_new = pcf50633_rtc_remove,
 };
 
 module_platform_driver(pcf50633_rtc_driver);
index 2e111cdb94f76cb74d7e96ef4fa4b336f91eaf56..e7115ebef70771e2ae8db1641b72e90320e0bd1f 100644 (file)
@@ -21,7 +21,7 @@
 #define PCF8523_CONTROL2_AF BIT(3)
 
 #define PCF8523_REG_CONTROL3 0x02
-#define PCF8523_CONTROL3_PM  GENMASK(7,5)
+#define PCF8523_CONTROL3_PM  GENMASK(7, 5)
 #define PCF8523_PM_STANDBY   0x7
 #define PCF8523_CONTROL3_BLF BIT(2) /* battery low bit, read-only */
 #define PCF8523_CONTROL3_BSF BIT(3)
@@ -65,7 +65,7 @@ static int pcf8523_load_capacitance(struct pcf8523 *pcf8523, struct device_node
                         load);
                fallthrough;
        case 12500:
-               value |= PCF8523_CONTROL1_CAP_SEL;
+               value = PCF8523_CONTROL1_CAP_SEL;
                break;
        case 7000:
                break;
@@ -234,8 +234,7 @@ static int pcf8523_param_get(struct device *dev, struct rtc_param *param)
        int ret;
        u32 value;
 
-       switch(param->param) {
-
+       switch (param->param) {
        case RTC_PARAM_BACKUP_SWITCH_MODE:
                ret = regmap_read(pcf8523->regmap, PCF8523_REG_CONTROL3, &value);
                if (ret < 0)
@@ -243,7 +242,7 @@ static int pcf8523_param_get(struct device *dev, struct rtc_param *param)
 
                value = FIELD_GET(PCF8523_CONTROL3_PM, value);
 
-               switch(value) {
+               switch (value) {
                case 0x0:
                case 0x4:
                        param->uvalue = RTC_BSM_LEVEL;
@@ -273,7 +272,7 @@ static int pcf8523_param_set(struct device *dev, struct rtc_param *param)
        struct pcf8523 *pcf8523 = dev_get_drvdata(dev);
        u8 mode;
 
-       switch(param->param) {
+       switch (param->param) {
        case RTC_PARAM_BACKUP_SWITCH_MODE:
                switch (param->uvalue) {
                case RTC_BSM_DISABLED:
@@ -385,9 +384,9 @@ static const struct rtc_class_ops pcf8523_rtc_ops = {
 };
 
 static const struct regmap_config regmap_config = {
-        .reg_bits = 8,
-        .val_bits = 8,
-        .max_register = 0x13,
+       .reg_bits = 8,
+       .val_bits = 8,
+       .max_register = 0x13,
 };
 
 static int pcf8523_probe(struct i2c_client *client)
index fa351ac201587e8556ebbf007790294d2f24d07f..4f85e0c3d75729f2d54ed062a587e516d421278f 100644 (file)
@@ -284,15 +284,13 @@ static void pic32_rtc_enable(struct pic32_rtc_dev *pdata, int en)
        clk_disable(pdata->clk);
 }
 
-static int pic32_rtc_remove(struct platform_device *pdev)
+static void pic32_rtc_remove(struct platform_device *pdev)
 {
        struct pic32_rtc_dev *pdata = platform_get_drvdata(pdev);
 
        pic32_rtc_setaie(&pdev->dev, 0);
        clk_unprepare(pdata->clk);
        pdata->clk = NULL;
-
-       return 0;
 }
 
 static int pic32_rtc_probe(struct platform_device *pdev)
@@ -373,7 +371,7 @@ MODULE_DEVICE_TABLE(of, pic32_rtc_dt_ids);
 
 static struct platform_driver pic32_rtc_driver = {
        .probe          = pic32_rtc_probe,
-       .remove         = pic32_rtc_remove,
+       .remove_new     = pic32_rtc_remove,
        .driver         = {
                .name   = "pic32-rtc",
                .of_match_table = of_match_ptr(pic32_rtc_dt_ids),
index 372494e82f405406b9c09ac4c9278c22f11d6caa..f6b779c12ca724177731fa1bee96f5f7696f6bb6 100644 (file)
@@ -530,15 +530,14 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int pm8xxx_remove(struct platform_device *pdev)
+static void pm8xxx_remove(struct platform_device *pdev)
 {
        dev_pm_clear_wake_irq(&pdev->dev);
-       return 0;
 }
 
 static struct platform_driver pm8xxx_rtc_driver = {
        .probe          = pm8xxx_rtc_probe,
-       .remove         = pm8xxx_remove,
+       .remove_new     = pm8xxx_remove,
        .driver = {
                .name           = "rtc-pm8xxx",
                .of_match_table = pm8xxx_id_table,
index 18684a7026c44ca10738be349756c9a28341047e..6f4bf919827a3a1cc115a80dbcbd442adc32cb29 100644 (file)
@@ -262,12 +262,11 @@ static int rc5t583_rtc_probe(struct platform_device *pdev)
  * Disable rc5t583 RTC interrupts.
  * Sets status flag to free.
  */
-static int rc5t583_rtc_remove(struct platform_device *pdev)
+static void rc5t583_rtc_remove(struct platform_device *pdev)
 {
        struct rc5t583_rtc *rc5t583_rtc = platform_get_drvdata(pdev);
 
        rc5t583_rtc_alarm_irq_enable(&rc5t583_rtc->rtc->dev, 0);
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -299,7 +298,7 @@ static SIMPLE_DEV_PM_OPS(rc5t583_rtc_pm_ops, rc5t583_rtc_suspend,
 
 static struct platform_driver rc5t583_rtc_driver = {
        .probe          = rc5t583_rtc_probe,
-       .remove         = rc5t583_rtc_remove,
+       .remove_new     = rc5t583_rtc_remove,
        .driver         = {
                .name   = "rtc-rc5t583",
                .pm     = &rc5t583_rtc_pm_ops,
index 8f9abd65846ca48cd2d00cdecc343def0f194cc6..29662dfd56fef9cb5f47e6427d227daccaf4b79b 100644 (file)
@@ -216,7 +216,7 @@ static int rtd119x_rtc_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int rtd119x_rtc_remove(struct platform_device *pdev)
+static void rtd119x_rtc_remove(struct platform_device *pdev)
 {
        struct rtd119x_rtc *data = platform_get_drvdata(pdev);
 
@@ -224,13 +224,11 @@ static int rtd119x_rtc_remove(struct platform_device *pdev)
 
        clk_disable_unprepare(data->clk);
        clk_put(data->clk);
-
-       return 0;
 }
 
 static struct platform_driver rtd119x_rtc_driver = {
        .probe = rtd119x_rtc_probe,
-       .remove = rtd119x_rtc_remove,
+       .remove_new = rtd119x_rtc_remove,
        .driver = {
                .name = "rtd1295-rtc",
                .of_match_table = rtd119x_rtc_dt_ids,
index 0d36bc50197c121844ef29cd7e7b81e8dd7fb115..dca736caba85224454ca929601942c6984192490 100644 (file)
@@ -391,11 +391,9 @@ dis_runtime_pm:
        return ret;
 }
 
-static int rzn1_rtc_remove(struct platform_device *pdev)
+static void rzn1_rtc_remove(struct platform_device *pdev)
 {
        pm_runtime_put(&pdev->dev);
-
-       return 0;
 }
 
 static const struct of_device_id rzn1_rtc_of_match[] = {
@@ -406,7 +404,7 @@ MODULE_DEVICE_TABLE(of, rzn1_rtc_of_match);
 
 static struct platform_driver rzn1_rtc_driver = {
        .probe = rzn1_rtc_probe,
-       .remove = rzn1_rtc_remove,
+       .remove_new = rzn1_rtc_remove,
        .driver = {
                .name   = "rzn1-rtc",
                .of_match_table = rzn1_rtc_of_match,
index 8fc5efde3e0b30c19b8f2e87e8ad05ae35483d05..70e1a18e5efdfa8db211bda90199483b935b0991 100644 (file)
@@ -385,7 +385,7 @@ static void s3c6410_rtc_disable(struct s3c_rtc *info)
        writew(con, info->base + S3C2410_RTCCON);
 }
 
-static int s3c_rtc_remove(struct platform_device *pdev)
+static void s3c_rtc_remove(struct platform_device *pdev)
 {
        struct s3c_rtc *info = platform_get_drvdata(pdev);
 
@@ -394,8 +394,6 @@ static int s3c_rtc_remove(struct platform_device *pdev)
        if (info->data->needs_src_clk)
                clk_unprepare(info->rtc_src_clk);
        clk_unprepare(info->rtc_clk);
-
-       return 0;
 }
 
 static int s3c_rtc_probe(struct platform_device *pdev)
@@ -600,7 +598,7 @@ MODULE_DEVICE_TABLE(of, s3c_rtc_dt_match);
 
 static struct platform_driver s3c_rtc_driver = {
        .probe          = s3c_rtc_probe,
-       .remove         = s3c_rtc_remove,
+       .remove_new     = s3c_rtc_remove,
        .driver         = {
                .name   = "s3c-rtc",
                .pm     = &s3c_rtc_pm_ops,
index 1250887e4382765f4f8fa0ee417e027b8376b5c3..0b2cfa8ca05bfa56cd90ee9e54596c98d498fba6 100644 (file)
@@ -297,7 +297,7 @@ static int sa1100_rtc_probe(struct platform_device *pdev)
        return sa1100_rtc_init(pdev, info);
 }
 
-static int sa1100_rtc_remove(struct platform_device *pdev)
+static void sa1100_rtc_remove(struct platform_device *pdev)
 {
        struct sa1100_rtc *info = platform_get_drvdata(pdev);
 
@@ -307,8 +307,6 @@ static int sa1100_rtc_remove(struct platform_device *pdev)
                spin_unlock_irq(&info->lock);
                clk_disable_unprepare(info->clk);
        }
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -343,7 +341,7 @@ MODULE_DEVICE_TABLE(of, sa1100_rtc_dt_ids);
 
 static struct platform_driver sa1100_rtc_driver = {
        .probe          = sa1100_rtc_probe,
-       .remove         = sa1100_rtc_remove,
+       .remove_new     = sa1100_rtc_remove,
        .driver         = {
                .name   = "sa1100-rtc",
                .pm     = &sa1100_rtc_pm_ops,
index 736fe535cd4570add073372982c03f2d21b81064..1df5c7e94198054e9c34d1e7d0525dbcc6d356f7 100644 (file)
@@ -405,15 +405,13 @@ err_disable_clock:
        return status;
 }
 
-static int spear_rtc_remove(struct platform_device *pdev)
+static void spear_rtc_remove(struct platform_device *pdev)
 {
        struct spear_rtc_config *config = platform_get_drvdata(pdev);
 
        spear_rtc_disable_interrupt(config);
        clk_disable_unprepare(config->clk);
        device_init_wakeup(&pdev->dev, 0);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -477,7 +475,7 @@ MODULE_DEVICE_TABLE(of, spear_rtc_id_table);
 
 static struct platform_driver spear_rtc_driver = {
        .probe = spear_rtc_probe,
-       .remove = spear_rtc_remove,
+       .remove_new = spear_rtc_remove,
        .shutdown = spear_rtc_shutdown,
        .driver = {
                .name = "rtc-spear",
index ac9e228b56d0bd0fc7b5541ec8a0c47e28e9129c..229cb2847cc4887a11dfcd5d4e476da4d110ae79 100644 (file)
@@ -846,7 +846,7 @@ err_no_rtc_ck:
        return ret;
 }
 
-static int stm32_rtc_remove(struct platform_device *pdev)
+static void stm32_rtc_remove(struct platform_device *pdev)
 {
        struct stm32_rtc *rtc = platform_get_drvdata(pdev);
        const struct stm32_rtc_registers *regs = &rtc->data->regs;
@@ -869,8 +869,6 @@ static int stm32_rtc_remove(struct platform_device *pdev)
 
        dev_pm_clear_wake_irq(&pdev->dev);
        device_init_wakeup(&pdev->dev, false);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -917,7 +915,7 @@ static SIMPLE_DEV_PM_OPS(stm32_rtc_pm_ops,
 
 static struct platform_driver stm32_rtc_driver = {
        .probe          = stm32_rtc_probe,
-       .remove         = stm32_rtc_remove,
+       .remove_new     = stm32_rtc_remove,
        .driver         = {
                .name   = DRIVER_NAME,
                .pm     = &stm32_rtc_pm_ops,
index aae40d20d086802fa23c13dd76c09d56db625f9f..6f11b745f34d95bfb0df5ca8e5033cfacbf3b6f0 100644 (file)
@@ -232,17 +232,15 @@ static const struct rtc_class_ops stmp3xxx_rtc_ops = {
        .set_alarm      = stmp3xxx_rtc_set_alarm,
 };
 
-static int stmp3xxx_rtc_remove(struct platform_device *pdev)
+static void stmp3xxx_rtc_remove(struct platform_device *pdev)
 {
        struct stmp3xxx_rtc_data *rtc_data = platform_get_drvdata(pdev);
 
        if (!rtc_data)
-               return 0;
+               return;
 
        writel(STMP3XXX_RTC_CTRL_ALARM_IRQ_EN,
                rtc_data->io + STMP3XXX_RTC_CTRL + STMP_OFFSET_REG_CLR);
-
-       return 0;
 }
 
 static int stmp3xxx_rtc_probe(struct platform_device *pdev)
@@ -406,7 +404,7 @@ MODULE_DEVICE_TABLE(of, rtc_dt_ids);
 
 static struct platform_driver stmp3xxx_rtcdrv = {
        .probe          = stmp3xxx_rtc_probe,
-       .remove         = stmp3xxx_rtc_remove,
+       .remove_new     = stmp3xxx_rtc_remove,
        .driver         = {
                .name   = "stmp3xxx-rtc",
                .pm     = &stmp3xxx_rtc_pm_ops,
index 7038f47d77ff4fcd79eeedd0dc52218824c42486..dc76537f1b62a3cee17c4f18ae17438efec07dc3 100644 (file)
@@ -260,7 +260,7 @@ static void __init sun6i_rtc_clk_init(struct device_node *node,
        }
 
        /* Switch to the external, more precise, oscillator, if present */
-       if (of_get_property(node, "clocks", NULL)) {
+       if (of_property_present(node, "clocks")) {
                reg |= SUN6I_LOSC_CTRL_EXT_OSC;
                if (rtc->data->has_losc_en)
                        reg |= SUN6I_LOSC_CTRL_EXT_LOSC_EN;
index 4b578e4d44f6aeb48583be4ac5cf7da82b3f96d4..f33dc301f3019338bc344abbf04efa104bde7f19 100644 (file)
@@ -235,8 +235,7 @@ static int sp_rtc_probe(struct platform_device *plat_dev)
        if (!sp_rtc)
                return -ENOMEM;
 
-       sp_rtc->res = platform_get_resource_byname(plat_dev, IORESOURCE_MEM, RTC_REG_NAME);
-       sp_rtc->reg_base = devm_ioremap_resource(&plat_dev->dev, sp_rtc->res);
+       sp_rtc->reg_base = devm_platform_ioremap_resource_byname(plat_dev, RTC_REG_NAME);
        if (IS_ERR(sp_rtc->reg_base))
                return dev_err_probe(&plat_dev->dev, PTR_ERR(sp_rtc->reg_base),
                                            "%s devm_ioremap_resource fail\n", RTC_REG_NAME);
@@ -304,15 +303,13 @@ free_clk:
        return ret;
 }
 
-static int sp_rtc_remove(struct platform_device *plat_dev)
+static void sp_rtc_remove(struct platform_device *plat_dev)
 {
        struct sunplus_rtc *sp_rtc = dev_get_drvdata(&plat_dev->dev);
 
        device_init_wakeup(&plat_dev->dev, 0);
        reset_control_assert(sp_rtc->rstc);
        clk_disable_unprepare(sp_rtc->rtcclk);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -347,7 +344,7 @@ static SIMPLE_DEV_PM_OPS(sp_rtc_pm_ops, sp_rtc_suspend, sp_rtc_resume);
 
 static struct platform_driver sp_rtc_driver = {
        .probe   = sp_rtc_probe,
-       .remove  = sp_rtc_remove,
+       .remove_new = sp_rtc_remove,
        .driver  = {
                .name   = "sp7021-rtc",
                .of_match_table = sp_rtc_of_match,
index 85f7ad5d5390c7ec67aa18788e587f51e83eb847..441e0a66b215b796db12357691f2205fd695f124 100644 (file)
@@ -342,13 +342,11 @@ disable_clk:
        return ret;
 }
 
-static int tegra_rtc_remove(struct platform_device *pdev)
+static void tegra_rtc_remove(struct platform_device *pdev)
 {
        struct tegra_rtc_info *info = platform_get_drvdata(pdev);
 
        clk_disable_unprepare(info->clk);
-
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -401,7 +399,7 @@ static void tegra_rtc_shutdown(struct platform_device *pdev)
 
 static struct platform_driver tegra_rtc_driver = {
        .probe = tegra_rtc_probe,
-       .remove = tegra_rtc_remove,
+       .remove_new = tegra_rtc_remove,
        .shutdown = tegra_rtc_shutdown,
        .driver = {
                .name = "tegra_rtc",
index ba23163cc0428247d73f163fe50ef046c0238d08..0d90fe923355079be2d0104670aa658a75777d63 100644 (file)
@@ -632,7 +632,8 @@ static int __maybe_unused ti_k3_rtc_suspend(struct device *dev)
        struct ti_k3_rtc *priv = dev_get_drvdata(dev);
 
        if (device_may_wakeup(dev))
-               enable_irq_wake(priv->irq);
+               return enable_irq_wake(priv->irq);
+
        return 0;
 }
 
index 52093e7ba22dddd313e8adba4341bf4cba07db3a..9f14e247574704222e25507198ae39249efd4164 100644 (file)
@@ -279,13 +279,12 @@ fail_rtc_register:
        return ret;
 };
 
-static int tps6586x_rtc_remove(struct platform_device *pdev)
+static void tps6586x_rtc_remove(struct platform_device *pdev)
 {
        struct device *tps_dev = to_tps6586x_dev(&pdev->dev);
 
        tps6586x_update(tps_dev, RTC_CTRL, 0,
                RTC_ENABLE | OSC_SRC_SEL | PRE_BYPASS | CL_SEL_MASK);
-       return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
@@ -317,7 +316,7 @@ static struct platform_driver tps6586x_rtc_driver = {
                .pm     = &tps6586x_pm_ops,
        },
        .probe  = tps6586x_rtc_probe,
-       .remove = tps6586x_rtc_remove,
+       .remove_new = tps6586x_rtc_remove,
 };
 module_platform_driver(tps6586x_rtc_driver);
 
index c24d1e18f56c96f4ee08b53f0b0e285bb84cd93c..81b36948c2fa3e65aadc6fd37d160b05dd5798b3 100644 (file)
@@ -586,7 +586,7 @@ static int twl_rtc_probe(struct platform_device *pdev)
  * Disable all TWL RTC module interrupts.
  * Sets status flag to free.
  */
-static int twl_rtc_remove(struct platform_device *pdev)
+static void twl_rtc_remove(struct platform_device *pdev)
 {
        struct twl_rtc *twl_rtc = platform_get_drvdata(pdev);
 
@@ -599,8 +599,6 @@ static int twl_rtc_remove(struct platform_device *pdev)
                twl6030_interrupt_mask(TWL6030_RTC_INT_MASK,
                        REG_INT_MSK_STS_A);
        }
-
-       return 0;
 }
 
 static void twl_rtc_shutdown(struct platform_device *pdev)
@@ -642,7 +640,7 @@ MODULE_DEVICE_TABLE(of, twl_rtc_of_match);
 
 static struct platform_driver twl4030rtc_driver = {
        .probe          = twl_rtc_probe,
-       .remove         = twl_rtc_remove,
+       .remove_new     = twl_rtc_remove,
        .shutdown       = twl_rtc_shutdown,
        .driver         = {
                .name           = "twl_rtc",
index 197b649cd6293958e36bfff887a62a0789f4d738..ccfa76513a2ca8fb4b6d36facb122a1a83eac300 100644 (file)
@@ -235,14 +235,12 @@ static int vt8500_rtc_probe(struct platform_device *pdev)
        return devm_rtc_register_device(vt8500_rtc->rtc);
 }
 
-static int vt8500_rtc_remove(struct platform_device *pdev)
+static void vt8500_rtc_remove(struct platform_device *pdev)
 {
        struct vt8500_rtc *vt8500_rtc = platform_get_drvdata(pdev);
 
        /* Disable alarm matching */
        writel(0, vt8500_rtc->regbase + VT8500_RTC_IS);
-
-       return 0;
 }
 
 static const struct of_device_id wmt_dt_ids[] = {
@@ -253,7 +251,7 @@ MODULE_DEVICE_TABLE(of, wmt_dt_ids);
 
 static struct platform_driver vt8500_rtc_driver = {
        .probe          = vt8500_rtc_probe,
-       .remove         = vt8500_rtc_remove,
+       .remove_new     = vt8500_rtc_remove,
        .driver         = {
                .name   = "vt8500-rtc",
                .of_match_table = wmt_dt_ids,
index 6eaa9321c074102c58fdf3aa8069a82936cab8be..947f8071803f1b2ed458232a3b20e2a1454c3255 100644 (file)
@@ -451,14 +451,12 @@ static int wm8350_rtc_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int wm8350_rtc_remove(struct platform_device *pdev)
+static void wm8350_rtc_remove(struct platform_device *pdev)
 {
        struct wm8350 *wm8350 = platform_get_drvdata(pdev);
 
        wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC, wm8350);
        wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM, wm8350);
-
-       return 0;
 }
 
 static SIMPLE_DEV_PM_OPS(wm8350_rtc_pm_ops, wm8350_rtc_suspend,
@@ -466,7 +464,7 @@ static SIMPLE_DEV_PM_OPS(wm8350_rtc_pm_ops, wm8350_rtc_suspend,
 
 static struct platform_driver wm8350_rtc_driver = {
        .probe = wm8350_rtc_probe,
-       .remove = wm8350_rtc_remove,
+       .remove_new = wm8350_rtc_remove,
        .driver = {
                .name = "wm8350-rtc",
                .pm = &wm8350_rtc_pm_ops,
index d3d0054e21fd02cf633b23d1071ad4a3450e19e5..f78efc9760c0e9c7ae5ef4c6526365b9ea5f8599 100644 (file)
@@ -192,14 +192,13 @@ static int xgene_rtc_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int xgene_rtc_remove(struct platform_device *pdev)
+static void xgene_rtc_remove(struct platform_device *pdev)
 {
        struct xgene_rtc_dev *pdata = platform_get_drvdata(pdev);
 
        xgene_rtc_alarm_irq_enable(&pdev->dev, 0);
        device_init_wakeup(&pdev->dev, 0);
        clk_disable_unprepare(pdata->clk);
-       return 0;
 }
 
 static int __maybe_unused xgene_rtc_suspend(struct device *dev)
@@ -264,7 +263,7 @@ MODULE_DEVICE_TABLE(of, xgene_rtc_of_match);
 
 static struct platform_driver xgene_rtc_driver = {
        .probe          = xgene_rtc_probe,
-       .remove         = xgene_rtc_remove,
+       .remove_new     = xgene_rtc_remove,
        .driver         = {
                .name   = "xgene-rtc",
                .pm = &xgene_rtc_pm_ops,
index c9b85c838ebe2debab010b951009dccc8a6bf8c4..08ed171bdab43a832c09abc1ed1edcdbac99615c 100644 (file)
@@ -342,12 +342,10 @@ static int xlnx_rtc_probe(struct platform_device *pdev)
        return devm_rtc_register_device(xrtcdev->rtc);
 }
 
-static int xlnx_rtc_remove(struct platform_device *pdev)
+static void xlnx_rtc_remove(struct platform_device *pdev)
 {
        xlnx_rtc_alarm_irq_enable(&pdev->dev, 0);
        device_init_wakeup(&pdev->dev, 0);
-
-       return 0;
 }
 
 static int __maybe_unused xlnx_rtc_suspend(struct device *dev)
@@ -384,7 +382,7 @@ MODULE_DEVICE_TABLE(of, xlnx_rtc_of_match);
 
 static struct platform_driver xlnx_rtc_driver = {
        .probe          = xlnx_rtc_probe,
-       .remove         = xlnx_rtc_remove,
+       .remove_new     = xlnx_rtc_remove,
        .driver         = {
                .name   = KBUILD_MODNAME,
                .pm     = &xlnx_rtc_pm_ops,