Commit 9de0077f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge 2.6.11.3 into mainline

parents 91e5a305 542d0e2a
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 11
EXTRAVERSION =
EXTRAVERSION = .3
NAME=Woozy Numbat
# *DOCUMENTATION*
......
......@@ -328,6 +328,8 @@ int drm_setversion(DRM_IOCTL_ARGS)
memset(&version, 0, sizeof(version));
memset(&version, 0, sizeof(version));
dev->driver->version(&version);
retv.drm_di_major = DRM_IF_MAJOR;
retv.drm_di_minor = DRM_IF_MINOR;
......
......@@ -130,7 +130,7 @@ adv7170_write_block (struct i2c_client *client,
u8 block_data[32];
msg.addr = client->addr;
msg.flags = client->flags;
msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
......
......@@ -126,7 +126,7 @@ adv7175_write_block (struct i2c_client *client,
u8 block_data[32];
msg.addr = client->addr;
msg.flags = client->flags;
msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
......
......@@ -146,7 +146,7 @@ bt819_write_block (struct i2c_client *client,
u8 block_data[32];
msg.addr = client->addr;
msg.flags = client->flags;
msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
......
......@@ -61,8 +61,10 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)");
#define I2C_SAA7110 0x9C /* or 0x9E */
#define SAA7110_NR_REG 0x35
struct saa7110 {
unsigned char reg[54];
u8 reg[SAA7110_NR_REG];
int norm;
int input;
......@@ -96,31 +98,28 @@ saa7110_write_block (struct i2c_client *client,
unsigned int len)
{
int ret = -1;
u8 reg = *data++;
u8 reg = *data; /* first register to write to */
len--;
/* Sanity check */
if (reg + (len - 1) > SAA7110_NR_REG)
return ret;
/* the saa7110 has an autoincrement function, use it if
* the adapter understands raw I2C */
if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
struct saa7110 *decoder = i2c_get_clientdata(client);
struct i2c_msg msg;
u8 block_data[54];
msg.len = 0;
msg.buf = (char *) block_data;
msg.len = len;
msg.buf = (char *) data;
msg.addr = client->addr;
msg.flags = client->flags;
while (len >= 1) {
msg.len = 0;
block_data[msg.len++] = reg;
while (len-- >= 1 && msg.len < 54)
block_data[msg.len++] =
decoder->reg[reg++] = *data++;
ret = i2c_transfer(client->adapter, &msg, 1);
}
msg.flags = 0;
ret = i2c_transfer(client->adapter, &msg, 1);
/* Cache the written data */
memcpy(decoder->reg + reg, data + 1, len - 1);
} else {
while (len-- >= 1) {
for (++data, --len; len; len--) {
if ((ret = saa7110_write(client, reg++,
*data++)) < 0)
break;
......@@ -193,7 +192,7 @@ saa7110_selmux (struct i2c_client *client,
return 0;
}
static const unsigned char initseq[] = {
static const unsigned char initseq[1 + SAA7110_NR_REG] = {
0, 0x4C, 0x3C, 0x0D, 0xEF, 0xBD, 0xF2, 0x03, 0x00,
/* 0x08 */ 0xF8, 0xF8, 0x60, 0x60, 0x00, 0x86, 0x18, 0x90,
/* 0x10 */ 0x00, 0x59, 0x40, 0x46, 0x42, 0x1A, 0xFF, 0xDA,
......
......@@ -163,7 +163,7 @@ saa7114_write_block (struct i2c_client *client,
u8 block_data[32];
msg.addr = client->addr;
msg.flags = client->flags;
msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
......
......@@ -118,7 +118,7 @@ saa7185_write_block (struct i2c_client *client,
u8 block_data[32];
msg.addr = client->addr;
msg.flags = client->flags;
msg.flags = 0;
while (len >= 2) {
msg.buf = (char *) block_data;
msg.len = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment