diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-05-13 11:15:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-05-13 11:15:24 -0300 |
commit | e916f4cd0bb1f1815fcb5b617fa59ac57b4e7eb5 (patch) | |
tree | 2b27075dc737563fb0f86cbd1b7a79fa341fc6cc /linux | |
parent | 2459bf3000c7be8c5b73d2495df998039f400b00 (diff) | |
download | mediapointer-dvb-s2-e916f4cd0bb1f1815fcb5b617fa59ac57b4e7eb5.tar.gz mediapointer-dvb-s2-e916f4cd0bb1f1815fcb5b617fa59ac57b4e7eb5.tar.bz2 |
Backport several i2c cleanups from mainstream
From: Mauro Carvalho Chehab <mchehab@infradead.org>
backport commit 2096b956d24c4b5950b808fc23b218425d79ebb1 from David
Brownell <david-b@pacbell.net>
Maybe I've merged also other i2c cleanups here that happened on Kernel.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-i2c.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/frontends/dibx000_common.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/ovcamchip/ovcamchip_priv.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-cards.c | 1 | ||||
-rw-r--r-- | linux/include/linux/i2c-id.h | 4 | ||||
-rw-r--r-- | linux/include/media/ovcamchip.h | 1 | ||||
-rw-r--r-- | linux/include/media/tuner.h | 1 |
8 files changed, 10 insertions, 7 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c index 5347a406f..02a0ea6e1 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c @@ -183,7 +183,8 @@ int flexcop_i2c_init(struct flexcop_device *fc) mutex_init(&fc->i2c_mutex); memset(&fc->i2c_adap, 0, sizeof(struct i2c_adapter)); - strncpy(fc->i2c_adap.name, "B2C2 FlexCop device",I2C_NAME_SIZE); + strncpy(fc->i2c_adap.name, "B2C2 FlexCop device", + sizeof(fc->i2c_adap.name)); i2c_set_adapdata(&fc->i2c_adap,fc); diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c index e4d67534a..4c80823d8 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c @@ -19,7 +19,7 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d) return -EINVAL; } - strncpy(d->i2c_adap.name,d->desc->name,I2C_NAME_SIZE); + strncpy(d->i2c_adap.name, d->desc->name, sizeof(d->i2c_adap.name)); #ifdef I2C_ADAP_CLASS_TV_DIGITAL d->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL, #else diff --git a/linux/drivers/media/dvb/frontends/dibx000_common.c b/linux/drivers/media/dvb/frontends/dibx000_common.c index 1f6dc06a3..a8e3a950c 100644 --- a/linux/drivers/media/dvb/frontends/dibx000_common.c +++ b/linux/drivers/media/dvb/frontends/dibx000_common.c @@ -144,9 +144,9 @@ struct i2c_adapter * dibx000_get_i2c_adapter(struct dibx000_i2c_master *mst, enu } EXPORT_SYMBOL(dibx000_get_i2c_adapter); -static int i2c_adapter_init(struct i2c_adapter *i2c_adap, struct i2c_algorithm *algo, const char name[I2C_NAME_SIZE], struct dibx000_i2c_master *mst) +static int i2c_adapter_init(struct i2c_adapter *i2c_adap, struct i2c_algorithm *algo, const char *name, struct dibx000_i2c_master *mst) { - strncpy(i2c_adap->name, name, I2C_NAME_SIZE); + strncpy(i2c_adap->name, name, sizeof(i2c_adap->name)); i2c_adap->class = I2C_CLASS_TV_DIGITAL, i2c_adap->algo = algo; i2c_adap->algo_data = NULL; diff --git a/linux/drivers/media/video/ovcamchip/ovcamchip_priv.h b/linux/drivers/media/video/ovcamchip/ovcamchip_priv.h index 1231335a9..50c7763d4 100644 --- a/linux/drivers/media/video/ovcamchip/ovcamchip_priv.h +++ b/linux/drivers/media/video/ovcamchip/ovcamchip_priv.h @@ -15,6 +15,7 @@ #ifndef __LINUX_OVCAMCHIP_PRIV_H #define __LINUX_OVCAMCHIP_PRIV_H +#include <linux/i2c.h> #include <media/ovcamchip.h> #ifdef DEBUG diff --git a/linux/drivers/media/video/usbvision/usbvision-cards.c b/linux/drivers/media/video/usbvision/usbvision-cards.c index 25583c926..ecb10b296 100644 --- a/linux/drivers/media/video/usbvision/usbvision-cards.c +++ b/linux/drivers/media/video/usbvision/usbvision-cards.c @@ -24,7 +24,6 @@ #include <linux/list.h> -#include <linux/i2c.h> #include "compat.h" #include <media/v4l2-dev.h> #include <media/tuner.h> diff --git a/linux/include/linux/i2c-id.h b/linux/include/linux/i2c-id.h index 9c21dc793..aa83d4163 100644 --- a/linux/include/linux/i2c-id.h +++ b/linux/include/linux/i2c-id.h @@ -117,6 +117,7 @@ #define I2C_DRIVERID_ISL1208 88 /* Intersil ISL1208 RTC */ #define I2C_DRIVERID_WM8731 89 /* Wolfson WM8731 audio codec */ #define I2C_DRIVERID_WM8750 90 /* Wolfson WM8750 audio codec */ +#define I2C_DRIVERID_WM8753 91 /* Wolfson WM8753 audio codec */ #define I2C_DRIVERID_I2CDEV 900 #define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ @@ -258,8 +259,9 @@ /* --- MCP107 adapter */ #define I2C_HW_MPC107 0x0d0000 -/* --- Marvell mv64xxx i2c adapter */ +/* --- Embedded adapters */ #define I2C_HW_MV64XXX 0x190000 +#define I2C_HW_BLACKFIN 0x190001 /* ADI Blackfin I2C TWI driver */ /* --- Miscellaneous adapters */ #define I2C_HW_SAA7146 0x060000 /* SAA7146 video decoder bus */ diff --git a/linux/include/media/ovcamchip.h b/linux/include/media/ovcamchip.h index 9813334d6..9ac7da26e 100644 --- a/linux/include/media/ovcamchip.h +++ b/linux/include/media/ovcamchip.h @@ -17,7 +17,6 @@ #include "compat.h" #include <linux/videodev.h> #include <media/v4l2-common.h> -#include <linux/i2c.h> /* --------------------------------- */ /* ENUMERATIONS */ diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h index 27d2183a4..8e1e4738b 100644 --- a/linux/include/media/tuner.h +++ b/linux/include/media/tuner.h @@ -23,6 +23,7 @@ #define _TUNER_H #include <linux/videodev2.h> +#include <linux/i2c.h> #include <media/tuner-types.h> extern int tuner_debug; |