[PATCH] rtc-cmos: use cmos_rtc_board_info to determine wake_on callback
David Brownell
david-b at pacbell.net
Sun Jul 8 01:06:03 EDT 2007
On Saturday 07 July 2007, Marcelo Tosatti wrote:
>
> From my understand ACPI fills a cmos_rtc_board_info with pointers for
> wake_on/wake_off callbacks and registers that at dev->platform_data.
>
> So use that to retrieve the callback pointers.
>
> Am I missing something?
This is retrieved already in the probe() routine, which
does other board-specific setup that may be needed.
So this patch isn't needed. Or, in fact, correct ... both
the wake_on() and wake_off() methods are required.
> diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
> index e24ea82..5bfab23 100644
> --- a/drivers/rtc/rtc-cmos.c
> +++ b/drivers/rtc/rtc-cmos.c
> @@ -549,6 +549,7 @@ #ifdef CONFIG_PM
> static int cmos_suspend(struct device *dev, pm_message_t mesg)
> {
> struct cmos_rtc *cmos = dev_get_drvdata(dev);
> + struct cmos_rtc_board_info *board_info = dev->platform_data;
> int do_wake = device_may_wakeup(dev);
> unsigned char tmp;
>
> @@ -572,8 +573,8 @@ static int cmos_suspend(struct device *d
>
> if (tmp & RTC_AIE) {
> cmos->enabled_wake = 1;
> - if (cmos->wake_on)
> - cmos->wake_on(dev);
> + if (board_info->wake_on)
> + board_info->wake_on(dev);
> else
> enable_irq_wake(cmos->irq);
> }
>
More information about the Devel
mailing list