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 19:14:47 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Shiraz Hashim <shiraz.hashim@...com>
Cc:	thierry.reding@...onic-design.de, linux-kernel@...r.kernel.org,
	spear-devel@...t.st.com
Subject: Re: [PATCH V2] PWM: Add SPEAr PWM chip driver support

On 19 October 2012 15:45, Shiraz Hashim <shiraz.hashim@...com> wrote:
> diff --git a/Documentation/devicetree/bindings/pwm/spear-pwm.txt b/Documentation/devicetree/bindings/pwm/spear-pwm.txt
> +        pwm: pwm@...00000 {
> +            compatible ="st,spear320-pwm";
> +            reg = <0xa8000000 0x1000>;
> +            #pwm-cells = <2>;
> +            status = "disabled";

Must remove disabled from here. Isn't it?

> diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c
> +#include <linux/clk.h>
> +#include <linux/err.h>
> +#include <linux/io.h>
> +#include <linux/ioport.h>
> +#include <linux/kernel.h>
> +#include <linux/math64.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/platform_device.h>
> +#include <linux/pwm.h>
> +#include <linux/slab.h>
> +#include <linux/types.h>
> +
> +#define NUM_PWM                4
> +
> +/* PWM registers and bits definitions */
> +#define PWMCR                  0x00    /* Control Register */
> +#define PWMCR_PWM_ENABLE       0x1
> +#define PWMCR_PRESCALE_SHIFT   2
> +#define PWMCR_MIN_PRESCALE     0x00
> +#define PWMCR_MAX_PRESCALE     0x3FFF

I would do it as to make it more readable, your call:

#define PWMCR                  0x00    /* Control Register */
	#define PWMCR_PWM_ENABLE       0x1
	#define PWMCR_PRESCALE_SHIFT   2
	#define PWMCR_MIN_PRESCALE     0x00
	#define PWMCR_MAX_PRESCALE     0x3FFF

> +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;

Sorry for not asking earlier, how can this be true anytime?

--
viresh
--
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