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:	Wed, 24 Jun 2015 17:39:08 +0200
From:	Jürg Billeter <j@...ron.ch>
To:	Peter Hurley <peter@...leysoftware.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Gigi Joseph <gigi.joseph@...il.com>,
	Colin Ian King <colin.king@...onical.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] ti-st: st_kim: fix nshutdown_gpio in
 get_platform_data

On Wed, 2015-06-24 at 11:31 -0400, Peter Hurley wrote:
> On 06/24/2015 06:24 AM, Jürg Billeter wrote:
> > @@ -761,8 +762,14 @@ static struct ti_st_plat_data
> > *get_platform_data(struct device *dev)
> >  	dt_property = of_get_property(np, "dev_name", &len);
> >  	if (dt_property)
> >  		memcpy(&dt_pdata->dev_name, dt_property, len);
> > -	of_property_read_u32(np, "nshutdown_gpio",
> > -			     &dt_pdata->nshutdown_gpio);
> > +
> > +	gpio = of_get_named_gpio(np, "nshutdown_gpio", 0);
> 
> NAK. This breaks existing dtbs, since the format is not the same.

Isn't the existing code completely broken as there is no predictable
GPIO numbering in general? There is also no documentation or use of
that device tree property in the kernel tree, as far as I can tell.

Do you have a suggestion how to fix this without breaking existing
dtbs? Do we need to introduce a second property and support both in the
driver?

Regards,
Jürg
--
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