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

Stephen Rothwell sfr at canb.auug.org.au
Tue Nov 6 15:40:04 EST 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.ozlabs.org/pipermail/linuxppc-dev/attachments/20071106/fc791096/attachment.pgp>


More information about the Linuxppc-dev mailing list