[i2c] [RFC] Rework of i2c-mpc.c - Freescale i2c driver

Stephen Rothwell sfr at canb.auug.org.au
Tue Nov 6 05:40:04 CET 2007


Hi Jon,

On Mon, 5 Nov 2007 23:25:35 -0500 "Jon Smirl" <jonsmirl at gmail.com> wrote:
>
> +		compatible = of_get_property(node, "compatible", &len);
> +		strlcpy(info.driver_name, compatible, len);

Of course, you will check len against sizeof(info.driver_name), right?

> -/* With some changes from Kyösti Mälkki <kmalkki at cc.hut.fi>.
> +/* With some changes from Kyï¿œsti Mï¿œlkki <kmalkki at cc.hut.fi>.

Did you mean to change this?

> +	char **alias;

const char ** would be nicer.

>  struct i2c_driver {
>  	int id;
>  	unsigned int class;
> +	
> +	/* Alias name for the driver. Used to support device trees on
> +	 * the PowerPC architecture. Device tree names take the form of
> +	 * vendor,chip. For example "epson,pcf8564". Alias is a list of
> +	 * strings terminated by a zero entry.
> +	 */
> +	char **alias;

const char ** would be nicer;

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/i2c/attachments/20071106/fc791096/attachment.bin 


More information about the i2c mailing list