diff options
Diffstat (limited to 'drivers/media/video/saa7115.c')
-rw-r--r-- | drivers/media/video/saa7115.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 4d5bbd859de1..2d18f0069821 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/i2c.h> | 45 | #include <linux/i2c.h> |
46 | #include <linux/videodev2.h> | 46 | #include <linux/videodev2.h> |
47 | #include <media/v4l2-common.h> | 47 | #include <media/v4l2-common.h> |
48 | #include <media/v4l2-chip-ident.h> | ||
48 | #include <media/saa7115.h> | 49 | #include <media/saa7115.h> |
49 | #include <asm/div64.h> | 50 | #include <asm/div64.h> |
50 | 51 | ||
@@ -80,7 +81,7 @@ struct saa711x_state { | |||
80 | int sat; | 81 | int sat; |
81 | int width; | 82 | int width; |
82 | int height; | 83 | int height; |
83 | enum v4l2_chip_ident ident; | 84 | u32 ident; |
84 | u32 audclk_freq; | 85 | u32 audclk_freq; |
85 | u32 crystal_freq; | 86 | u32 crystal_freq; |
86 | u8 ucgc; | 87 | u8 ucgc; |
@@ -1232,7 +1233,6 @@ static void saa711x_decode_vbi_line(struct i2c_client *client, | |||
1232 | static int saa711x_command(struct i2c_client *client, unsigned int cmd, void *arg) | 1233 | static int saa711x_command(struct i2c_client *client, unsigned int cmd, void *arg) |
1233 | { | 1234 | { |
1234 | struct saa711x_state *state = i2c_get_clientdata(client); | 1235 | struct saa711x_state *state = i2c_get_clientdata(client); |
1235 | int *iarg = arg; | ||
1236 | 1236 | ||
1237 | /* ioctls to allow direct access to the saa7115 registers for testing */ | 1237 | /* ioctls to allow direct access to the saa7115 registers for testing */ |
1238 | switch (cmd) { | 1238 | switch (cmd) { |
@@ -1437,9 +1437,8 @@ static int saa711x_command(struct i2c_client *client, unsigned int cmd, void *ar | |||
1437 | } | 1437 | } |
1438 | #endif | 1438 | #endif |
1439 | 1439 | ||
1440 | case VIDIOC_INT_G_CHIP_IDENT: | 1440 | case VIDIOC_G_CHIP_IDENT: |
1441 | *iarg = state->ident; | 1441 | return v4l2_chip_ident_i2c_client(client, arg, state->ident, 0); |
1442 | break; | ||
1443 | 1442 | ||
1444 | default: | 1443 | default: |
1445 | return -EINVAL; | 1444 | return -EINVAL; |
@@ -1487,6 +1486,7 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1487 | if (memcmp(name, "1f711", 5)) { | 1486 | if (memcmp(name, "1f711", 5)) { |
1488 | v4l_dbg(1, debug, client, "chip found @ 0x%x (ID %s) does not match a known saa711x chip.\n", | 1487 | v4l_dbg(1, debug, client, "chip found @ 0x%x (ID %s) does not match a known saa711x chip.\n", |
1489 | address << 1, name); | 1488 | address << 1, name); |
1489 | kfree(client); | ||
1490 | return 0; | 1490 | return 0; |
1491 | } | 1491 | } |
1492 | 1492 | ||