Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: omap: remove unused argument
@ 2026-09-17 14:26 alexandre.belloni
  2026-09-21 14:21 ` Nishanth Menon
  0 siblings, 1 reply; 2+ messages in thread
From: alexandre.belloni @ 2026-09-17 14:26 UTC (permalink / raw)
  To: Alexandre Belloni, Nishanth Menon, Santosh Shilimkar
  Cc: linux-rtc, linux-kernel, linux-arm-kernel

From: Alexandre Belloni <alexandre.belloni@bootlin.com>

omap_rtc_power_off_program takes one argument that is never used. One call
passes the struct device of the rtc but the other one passes its parent.
To avoid confusion, stop taking any argument

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 drivers/rtc/rtc-omap.c       | 5 ++---
 drivers/soc/ti/pm33xx.c      | 2 +-
 include/linux/rtc/rtc-omap.h | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 0f90065e352c..18492165a19f 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -408,7 +408,7 @@ static struct omap_rtc *omap_rtc_power_off_rtc;
  * generates pmic_pwr_enable control, which can be used to control an external
  * PMIC.
  */
-int omap_rtc_power_off_program(struct device *dev)
+int omap_rtc_power_off_program(void)
 {
 	struct omap_rtc *rtc = omap_rtc_power_off_rtc;
 	struct rtc_time tm;
@@ -481,10 +481,9 @@ EXPORT_SYMBOL(omap_rtc_power_off_program);
  */
 static void omap_rtc_power_off(void)
 {
-	struct rtc_device *rtc = omap_rtc_power_off_rtc->rtc;
 	u32 val;
 
-	omap_rtc_power_off_program(rtc->dev.parent);
+	omap_rtc_power_off_program();
 
 	/* Set PMIC power enable and EXT_WAKEUP in case PB power on is used */
 	omap_rtc_power_off_rtc->type->unlock(omap_rtc_power_off_rtc);
diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
index dc52a2197d24..82979122417d 100644
--- a/drivers/soc/ti/pm33xx.c
+++ b/drivers/soc/ti/pm33xx.c
@@ -174,7 +174,7 @@ static struct wkup_m3_wakeup_src rtc_wake_src(void)
 
 static int am33xx_rtc_only_idle(unsigned long wfi_flags)
 {
-	omap_rtc_power_off_program(&omap_rtc->dev);
+	omap_rtc_power_off_program();
 	am33xx_do_wfi_sram(wfi_flags);
 	return 0;
 }
diff --git a/include/linux/rtc/rtc-omap.h b/include/linux/rtc/rtc-omap.h
index 9f03a329e63f..d6ec7c4daea6 100644
--- a/include/linux/rtc/rtc-omap.h
+++ b/include/linux/rtc/rtc-omap.h
@@ -3,5 +3,5 @@
 #ifndef _LINUX_RTCOMAP_H_
 #define _LINUX_RTCOMAP_H_
 
-int omap_rtc_power_off_program(struct device *dev);
+int omap_rtc_power_off_program(void);
 #endif /* _LINUX_RTCOMAP_H_ */
-- 
2.55.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtc: omap: remove unused argument
  2026-09-17 14:26 [PATCH] rtc: omap: remove unused argument alexandre.belloni
@ 2026-09-21 14:21 ` Nishanth Menon
  0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Menon @ 2026-09-21 14:21 UTC (permalink / raw)
  To: alexandre.belloni
  Cc: Santosh Shilimkar, linux-rtc, linux-kernel, linux-arm-kernel

On 16:26-20260917, alexandre.belloni@bootlin.com wrote:
> From: Alexandre Belloni <alexandre.belloni@bootlin.com>
> 
> omap_rtc_power_off_program takes one argument that is never used. One call
> passes the struct device of the rtc but the other one passes its parent.
> To avoid confusion, stop taking any argument
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
> ---
>  drivers/rtc/rtc-omap.c       | 5 ++---
>  drivers/soc/ti/pm33xx.c      | 2 +-
>  include/linux/rtc/rtc-omap.h | 2 +-
>  3 files changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
> index 0f90065e352c..18492165a19f 100644
> --- a/drivers/rtc/rtc-omap.c
> +++ b/drivers/rtc/rtc-omap.c
> @@ -408,7 +408,7 @@ static struct omap_rtc *omap_rtc_power_off_rtc;
>   * generates pmic_pwr_enable control, which can be used to control an external
>   * PMIC.
>   */
> -int omap_rtc_power_off_program(struct device *dev)
> +int omap_rtc_power_off_program(void)
>  {
>  	struct omap_rtc *rtc = omap_rtc_power_off_rtc;
>  	struct rtc_time tm;
> @@ -481,10 +481,9 @@ EXPORT_SYMBOL(omap_rtc_power_off_program);
>   */
>  static void omap_rtc_power_off(void)
>  {
> -	struct rtc_device *rtc = omap_rtc_power_off_rtc->rtc;
>  	u32 val;
>  
> -	omap_rtc_power_off_program(rtc->dev.parent);
> +	omap_rtc_power_off_program();
>  
>  	/* Set PMIC power enable and EXT_WAKEUP in case PB power on is used */
>  	omap_rtc_power_off_rtc->type->unlock(omap_rtc_power_off_rtc);
> diff --git a/drivers/soc/ti/pm33xx.c b/drivers/soc/ti/pm33xx.c
> index dc52a2197d24..82979122417d 100644
> --- a/drivers/soc/ti/pm33xx.c
> +++ b/drivers/soc/ti/pm33xx.c
> @@ -174,7 +174,7 @@ static struct wkup_m3_wakeup_src rtc_wake_src(void)
>  
>  static int am33xx_rtc_only_idle(unsigned long wfi_flags)
>  {
> -	omap_rtc_power_off_program(&omap_rtc->dev);
> +	omap_rtc_power_off_program();
>  	am33xx_do_wfi_sram(wfi_flags);
>  	return 0;
>  }
> diff --git a/include/linux/rtc/rtc-omap.h b/include/linux/rtc/rtc-omap.h
> index 9f03a329e63f..d6ec7c4daea6 100644
> --- a/include/linux/rtc/rtc-omap.h
> +++ b/include/linux/rtc/rtc-omap.h
> @@ -3,5 +3,5 @@
>  #ifndef _LINUX_RTCOMAP_H_
>  #define _LINUX_RTCOMAP_H_
>  
> -int omap_rtc_power_off_program(struct device *dev);
> +int omap_rtc_power_off_program(void);
>  #endif /* _LINUX_RTCOMAP_H_ */
> -- 
> 2.55.0
> 

Reviewed-by: Nishanth Menon <nm@ti.com>

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-21 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17 14:26 [PATCH] rtc: omap: remove unused argument alexandre.belloni
2026-09-21 14:21 ` Nishanth Menon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox