lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Oct 2012 15:15:34 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Shiraz Hashim <shiraz.hashim@...com>
Cc:	thierry.reding@...onic-design.de,
	spear--sw-devel@...ts.codex.cro.st.com,
	linux-kernel@...r.kernel.org, spear-devel@...t.st.com
Subject: Re: [PATCH] pwm: add spear pwm driver support

On 19 October 2012 15:13, Shiraz Hashim <shiraz.hashim@...com> wrote:
> It may not be required as pwms which are not enabled do not have
> their clocks enabled. Hence, perhaps we can do following,
>
> 8<---------------------------
> static int spear_pwm_remove(struct platform_device *pdev)
> {
>         struct spear_pwm_chip *pc = platform_get_drvdata(pdev);
>         int i;
>
>         if (WARN_ON(!pc))
>                 return -ENODEV;
>
>         for (i = 0; i < NUM_PWM; i++) {
>                 struct pwm_device *pwm = &pc->chip.pwms[i];
>
>                 if (test_bit(PWMF_ENABLED, &pwm->flags)) {
>                         spear_pwm_writel(pc, i, PWMCR, 0);
>                         clk_disable(pc->clk);
>                 }
>         }
>
>         /* clk was prepared in probe, hence unprepare it here */
>         clk_unprepare(pc->clk);
>         return pwmchip_remove(&pc->chip);
> }

Better.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ