02 Sep, 2016
1 commit
-
Check for rtc_class_ops structures that are only passed to
devm_rtc_device_register, rtc_device_register,
platform_device_register_data, all of which declare the corresponding
parameter as const. Declare rtc_class_ops structures that have these
properties as const.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct rtc_class_ops i@p = { ... };@ok@
identifier r.i;
expression e1,e2,e3,e4;
position p;
@@
(
devm_rtc_device_register(e1,e2,&i@p,e3)
|
rtc_device_register(e1,e2,&i@p,e3)
|
platform_device_register_data(e1,e2,e3,&i@p,e4)
)@bad@
position p != {r.p,ok.p};
identifier r.i;
@@
i@p@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct rtc_class_ops i = { ... };
//Signed-off-by: Julia Lawall
Acked-by: Baruch Siach
Acked-by: Hans Ulli Kroll
Acked-by: Linus Walleij
Acked-by: Thierry Reding
Signed-off-by: Alexandre Belloni
09 Jul, 2016
1 commit
-
Since commit d68778b80dd7 ("rtc: initialize output parameter for read
alarm to "uninitialized"") there is no need to explicitly set
unsupported members to -1. So drop the respective assignments from
drivers.Signed-off-by: Uwe Kleine-König
Signed-off-by: Alexandre Belloni
16 Apr, 2015
1 commit
-
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to
seq_has_overflowed() and make public")Signed-off-by: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
18 May, 2013
1 commit
-
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.Signed-off-by: Wolfram Sang
Acked-by: Stephen Warren
30 Apr, 2013
6 commits
-
Use devm_rtc_device_register() for registering RTC device. This will
reduce the code for unregistering RTC device in cleanup path and remove
the implementation of remove callback of platform driver.Signed-off-by: Laxman Dewangan
Reviewed-by: Thierry Reding
Reviewed-by: Stephen Warren
Cc: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The irq name of tegra rtc shows as "rtc alarm" which actually does not
reflect the name related to driver.Passing the device name to have the irq names with driver name.
Signed-off-by: Laxman Dewangan
Reviewed-by: Thierry Reding
Reviewed-by: Stephen Warren
Cc: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Make the Tegra RTC controller driver define its PM callbacks through a
struct dev_pm_ops object rather than by using legacy PM hooks in struct
platform_driver.Signed-off-by: Laxman Dewangan
Reviewed-by: Thierry Reding
Reviewed-by: Stephen Warren
Cc: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
CONFIG_PM doesn't actually enable any of the PM callbacks, it only allows
to enable CONFIG_PM_SLEEP and CONFIG_PM_RUNTIME. This means if CONFIG_PM
is used to protect system sleep callbacks then it may end up unreferenced
if only runtime PM is enabled. Hence protecting sleep callbacks with
CONFIG_PM_SLEEP.Signed-off-by: Laxman Dewangan
Reviewed-by: Thierry Reding
Reviewed-by: Stephen Warren
Cc: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use module_platform_driver_probe() macro which makes the code smaller and
simpler.Signed-off-by: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When platform_driver_probe() is used, bind/unbind via sysfs is disabled.
Thus, __init/__exit annotations can be added to probe()/remove().Signed-off-by: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Jan, 2013
1 commit
-
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.Signed-off-by: Thierry Reding
Acked-by: Viresh Kumar
Cc: Alessandro Zummo
Signed-off-by: Greg Kroah-Hartman
05 Jan, 2013
1 commit
-
After Kernel 3.7, the Tegra device will only support booting with DT.
The legacy Tegra RTC platform driver will not work anymore. This patch
converts the driver to support DT.Signed-off-by: Joseph Lo
Cc: Stephen Warren
Cc: Joseph Lo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Jan, 2013
1 commit
-
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.Cc: Bill Pemberton
Cc: Alessandro Zummo
Cc: Srinidhi Kasagar
Cc: Linus Walleij
Cc: Mike Frysinger
Cc: Wan ZongShun
Cc: Guan Xuetao
Cc: Mark Brown
Signed-off-by: Greg Kroah-Hartman
30 May, 2012
1 commit
-
Use the devres managed resource functions in the probe routine. Also
affects the remove routine where the previously used free and release
functions are not needed.The devm_* functions eliminate the need for manual resource releasing and
simplify error handling. Resources allocated by devm_* are freed
automatically on driver detach.Signed-off-by: Hannu Heikkinen
Acked-by: Stephen Warren
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jul, 2011
1 commit
-
Using __SPIN_LOCK_UNLOCKED for a dynamically allocated lock is wrong and
breaks the build with PREEMPT_RT_FULL.Signed-off-by: Uwe Kleine-König
Cc: Andrew Chew
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Mar, 2011
1 commit
-
This is a platform driver that supports the built-in real-time clock on
Tegra SOCs.Signed-off-by: Andrew Chew
Acked-by: Alessandro Zummo
Acked-by: Wan ZongShun
Acked-by: Jon Mayo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds