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:	Thu, 21 Oct 2010 14:19:22 -0700
From:	Joe Perches <joe@...ches.com>
To:	Cyril Chemparathy <cyril@...com>
Cc:	davinci-linux-open-source@...ux.davincidsp.com,
	spi-devel-general@...ts.sourceforge.net,
	broonie@...nsource.wolfsonmicro.com, lrg@...mlogic.co.uk,
	dbrownell@...rs.sourceforge.net, grant.likely@...retlab.ca,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	rpurdie@...ys.net
Subject: Re: [PATCH v3 10/12] backlight: add support for tps6116x controller

On Thu, 2010-10-21 at 17:01 -0400, Cyril Chemparathy wrote:
> diff --git a/drivers/video/backlight/tps6116x.c b/drivers/video/backlight/tps6116x.c

just some trivia:

> @@ -0,0 +1,340 @@
[]
> +struct tps6116x {
> +	struct ti_ssp_device		*handle;
> +	struct device			*dev;
> +	int				gpio, gpio_initialized;
> +	struct mutex			lock;
> +	int				intensity;
> +	int				power;
> +	struct backlight_properties	props;
> +	struct backlight_device		*bl;
> +	int				suspended:1;
> +	struct regulator		*regulator;
> +};

Perhaps several of these should be bool.
gpio_initialized, power, suspended

[]

> +static int __devinit tps6116x_probe(struct platform_device *pdev)
> +{
> +	struct tps6116x *hw;
> +	struct device *dev = &pdev->dev;
> +	struct backlight_properties props;
> +	int error;
> +
> +	hw = kzalloc(sizeof(struct tps6116x), GFP_KERNEL);
> +	if (!hw) {
> +		error = -ENOMEM;
> +		dev_err(dev, "cannot allocate driver data\n");
> +		goto fail0;
> +	}
> +	platform_set_drvdata(pdev, hw);
> +
> +	memset(hw, 0, sizeof(struct tps6116x));

Unnecessary memset.


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