Re: [PATCH 1/5] input: misc: AD714x: The interrupt status registers should be read in row.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

On Tue, May 10, 2011 at 01:35:05PM +0200, michael.hennerich@xxxxxxxxxx wrote:
> 
> +static int ad714x_i2c_read_seq(struct device *dev, unsigned short reg,
> +				unsigned short *data, unsigned len)
> +{
> +	struct i2c_client *client = to_i2c_client(dev);
> +	int ret = 0, i;
> +	u8 *_reg = (u8 *)®
> +
> +	u8 tx[2] = {
> +		_reg[1],
> +		_reg[0]
> +	};

Eww... I think this will also break on arches with different endianness.
Can we pass the commands to be sent to the device as u8 array?

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux