Age | Commit message (Collapse) | Author | Files | Lines |
|
Commit 76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d
pwm: Add sysfs interface
causes a kernel oops due to a null pointer dereference on PXA platforms.
This happens because the class added by the patch is registered in a
subsys_initcall (initcall4), but the pxa pwm driver is registered in
arch_initcall (initcall3). If the class is not registered before the
driver probe function runs, the oops occurs in device_add() when the
uninitialized pointers in struct class are dereferenced. I don't see a
reason that the driver must be an arch_initcall, so this patch makes it
a regular module_platform_driver (initcall6), preventing the oops.
Signed-off-by: Mike Dunn <[email protected]>
Acked-by: Robert Jarzmik <[email protected]>
Acked-by: Marek Vasut <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
|
|
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Stephen Warren <[email protected]>
|
|
PWM_ID_BASE() is not used after convert to PWM framework, remove it.
Also update driver_data field of struct platform_device_id accordingly.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Eric Miao <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
|
|
clk_enable/clk_disable maintain an enable_count, clk_prepare and clk_unprepare
also maintain a prepare_count. These APIs will do prepare/enable when the first
user calling these APIs, and do disable/unprepare when the corresponding counter
reach 0. Thus We don't need to maintain a clk_enabled counter here.
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Eric Miao <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
|
|
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
Signed-off-by: Thierry Reding <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Make sure the duty-cycle and period passed in are not negative. This
should eventually be made implicit by making them unsigned. While at
it, the drivers' .config() implementations can have the equivalent
checks removed.
Signed-off-by: Thierry Reding <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Sachin Kamat <[email protected]>
Cc: Axel Lin <[email protected]>
Cc: Kukjin Kim <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: Jonghwan Choi <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: "Philip, Avinash" <[email protected]>
Cc: Vaibhav Bedia <[email protected]>
Acked-by: Jingoo Han <[email protected]>
|
|
If the pwmchip_remove() call fails, propagate the error to the driver's
remove callback. This is required to prevent the module from being
unloaded if a PWM provided by the driver is still in use.
Signed-off-by: Thierry Reding <[email protected]>
|
|
Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
|
|
This commit moves the PXA PWM driver to the drivers/pwm subdirectory and
converts it to use the new PWM framework.
Signed-off-by: Thierry Reding <[email protected]>
|