rtc: cmos: Call cmos_wake_setup() from cmos_do_probe()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Nov 2022 12:07:08 +0000 (13:07 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 15 Nov 2022 20:06:34 +0000 (21:06 +0100)
commit508ccdfb86b21da37ad091003a4d4567709d5dfb
tree7d3594a34e859bd280537f60cd46a59270ab926a
parent60da73808298ff2cfa9f165d55eb3d7aa7078601
rtc: cmos: Call cmos_wake_setup() from cmos_do_probe()

Notice that cmos_wake_setup() is the only user of acpi_rtc_info and it
can operate on the cmos_rtc variable directly, so it need not set the
platform_data pointer before cmos_do_probe() is called.  Instead, it
can be called by cmos_do_probe() in the case when the platform_data
pointer is not set to implement the default behavior (which is to use
the FADT information as long as ACPI support is enabled).

Modify the code accordingly.

While at it, drop a comment that doesn't really match the code it is
supposed to be describing.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/4803444.31r3eYUQgx@kreacher
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-cmos.c