summaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-spear.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-11 23:06:55 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-11 23:06:55 +0200
commit7f33e7241d3dbad3c0563fd1fc79fc9380b5c351 (patch)
tree4f0f72e0954e9a5a60679780a4cdf0bf243d47e1 /drivers/pwm/pwm-spear.c
parentMerge tag 'soc2-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ar... (diff)
parentpwm: fsl-ftm: set pwm_chip can_sleep flag (diff)
downloadlinux-7f33e7241d3dbad3c0563fd1fc79fc9380b5c351.tar.xz
linux-7f33e7241d3dbad3c0563fd1fc79fc9380b5c351.zip
Merge tag 'pwm/for-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm changes from Thierry Reding: "The majority of these changes are cleanups and fixes across all drivers. Redundant error messages are removed and more PWM controllers set the .can_sleep flag to signal that they can't be used in atomic context. Support is added for the Broadcom Kona family of SoCs and the Intel LPSS driver can now probe PCI devices in addition to ACPI devices. Upon shutdown, the pwm-backlight driver will now power off the backlight. It also uses the new descriptor-based GPIO API for more concise GPIO handling. A large chunk of these changes also converts platforms to use the lookup mechanism rather than relying on the global number space to reference PWM devices. This is largely in preparation for more unification and cleanups in future patches. Eventually it will allow the legacy PWM API to be removed" * tag 'pwm/for-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (38 commits) pwm: fsl-ftm: set pwm_chip can_sleep flag pwm: ab8500: Fix wrong value shift for disable/enable PWM pwm: samsung: do not set manual update bit in pwm_samsung_config pwm: lp3943: Set pwm_chip can_sleep flag pwm: atmel: set pwm_chip can_sleep flag pwm: mxs: set pwm_chip can_sleep flag pwm: tiehrpwm: inline accessor functions pwm: tiehrpwm: don't build PM related functions when not needed pwm-backlight: retrieve configured PWM period leds: leds-pwm: retrieve configured PWM period ARM: pxa: hx4700: use PWM_LOOKUP to initialize struct pwm_lookup ARM: shmobile: armadillo: use PWM_LOOKUP to initialize struct pwm_lookup ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup pwm: modify PWM_LOOKUP to initialize all struct pwm_lookup members ARM: pxa: hx4700: initialize all the struct pwm_lookup members ARM: OMAP3: Beagle: initialize all the struct pwm_lookup members pwm: renesas-tpu: remove unused struct tpu_pwm_platform_data ARM: shmobile: armadillo: initialize all struct pwm_lookup members pwm: add period and polarity to struct pwm_lookup pwm: twl: Really disable twl6030 PWMs ...
Diffstat (limited to 'drivers/pwm/pwm-spear.c')
-rw-r--r--drivers/pwm/pwm-spear.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
index cb2d4f0f9711..6fd93e6a4122 100644
--- a/drivers/pwm/pwm-spear.c
+++ b/drivers/pwm/pwm-spear.c
@@ -179,10 +179,8 @@ static int spear_pwm_probe(struct platform_device *pdev)
u32 val;
pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
- if (!pc) {
- dev_err(&pdev->dev, "failed to allocate memory\n");
+ if (!pc)
return -ENOMEM;
- }
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
pc->mmio_base = devm_ioremap_resource(&pdev->dev, r);
@@ -222,7 +220,7 @@ static int spear_pwm_probe(struct platform_device *pdev)
}
ret = pwmchip_add(&pc->chip);
- if (!ret) {
+ if (ret < 0) {
clk_unprepare(pc->clk);
dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
}