aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm/pwm-spear.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-11 17:06:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-11 17:06:55 -0400
commit7f33e7241d3dbad3c0563fd1fc79fc9380b5c351 (patch)
tree4f0f72e0954e9a5a60679780a4cdf0bf243d47e1 /drivers/pwm/pwm-spear.c
parent2dc24b0d0636349d403ae803bbad0c84f6c2ea57 (diff)
parent39fd3f99aba3f7683fc9b62e916e4c886a1cb6b0 (diff)
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)
179 u32 val; 179 u32 val;
180 180
181 pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL); 181 pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
182 if (!pc) { 182 if (!pc)
183 dev_err(&pdev->dev, "failed to allocate memory\n");
184 return -ENOMEM; 183 return -ENOMEM;
185 }
186 184
187 r = platform_get_resource(pdev, IORESOURCE_MEM, 0); 185 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
188 pc->mmio_base = devm_ioremap_resource(&pdev->dev, r); 186 pc->mmio_base = devm_ioremap_resource(&pdev->dev, r);
@@ -222,7 +220,7 @@ static int spear_pwm_probe(struct platform_device *pdev)
222 } 220 }
223 221
224 ret = pwmchip_add(&pc->chip); 222 ret = pwmchip_add(&pc->chip);
225 if (!ret) { 223 if (ret < 0) {
226 clk_unprepare(pc->clk); 224 clk_unprepare(pc->clk);
227 dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret); 225 dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
228 } 226 }