Re[4]: [PATCH v3 1/5] rtc: mxc_rtc: Driver re work
From: Alexander Shiyan <hidden>
Date: 2013-06-30 08:45:44
Alexander Shiyan writes:quoted
quoted
On Sat, Jun 29, 2013 at 12:40:40PM +0400, Alexander Shiyan wrote:quoted
This patch rework mxc_rtc driver. Major changes have been made: - Added second clock support (optional) which permit module functionality. - Implemented support for periodic interrupts. - Some code have been optimized. Signed-off-by: Alexander Shiyan <redacted>
...
quoted
quoted
quoted
+ pdata->rtc_ops.open = mxc_rtc_open; + pdata->rtc_ops.release = mxc_rtc_release; + pdata->rtc_ops.read_time = mxc_rtc_read_time; + pdata->rtc_ops.set_mmss = mxc_rtc_set_mmss; + pdata->rtc_ops.read_alarm = mxc_rtc_read_alarm; + pdata->rtc_ops.set_alarm = mxc_rtc_set_alarm; + pdata->rtc_ops.alarm_irq_enable = mxc_rtc_alarm_irq_enable;So struct rtc_class_ops is embedded into struct rtc_plat_data now. Why is this necessary?Just save BSS. Can be moved into cleanup part.The purpose of platform_data is to convey platform specific information to drivers, not a general driver local storage. Thus platform_data should be treated read-only by drivers.
"pdata" here is not a platform_data. This is a private driver struct. this was be renamed by me in v1, but I revert these changes. ---