diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-02-13 16:09:03 -0500 |
---|---|---|
committer | Jean Delvare <khali@arrakis.delvare> | 2007-02-13 16:09:03 -0500 |
commit | 12a917f69d1468c91d646dbad8408dd0d39d6207 (patch) | |
tree | 3336f373d174600d0981d8a34de4cf0e26eab79f /drivers/media/dvb | |
parent | beb58aa39e6e5a52875defe12c7697b0bfa95d4c (diff) |
i2c: Declare more i2c_adapter parent devices
Declare the parent device of i2c_adapter devices each time we can
easily do so. It makes the i2c_adapter appear at the right place in
the device tree, rather than as a platform device.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Cc: Len Brown <len.brown@intel.com>
Cc: Jordan Crouse <jordan.crouse@amd.com>
Cc: Jody McIntyre <scjody@modernduck.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: v4l-dvb-maintainer@linuxtv.org
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/b2c2/flexcop-i2c.c | 1 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-i2c.c | 1 | ||||
-rw-r--r-- | drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-i2c.c b/drivers/media/dvb/b2c2/flexcop-i2c.c index e0bd2d8f0f0c..5347a406fff7 100644 --- a/drivers/media/dvb/b2c2/flexcop-i2c.c +++ b/drivers/media/dvb/b2c2/flexcop-i2c.c | |||
@@ -190,6 +190,7 @@ int flexcop_i2c_init(struct flexcop_device *fc) | |||
190 | fc->i2c_adap.class = I2C_CLASS_TV_DIGITAL; | 190 | fc->i2c_adap.class = I2C_CLASS_TV_DIGITAL; |
191 | fc->i2c_adap.algo = &flexcop_algo; | 191 | fc->i2c_adap.algo = &flexcop_algo; |
192 | fc->i2c_adap.algo_data = NULL; | 192 | fc->i2c_adap.algo_data = NULL; |
193 | fc->i2c_adap.dev.parent = fc->dev; | ||
193 | 194 | ||
194 | if ((ret = i2c_add_adapter(&fc->i2c_adap)) < 0) | 195 | if ((ret = i2c_add_adapter(&fc->i2c_adap)) < 0) |
195 | return ret; | 196 | return ret; |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c index 55ba020386c9..70df31b0a8a9 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c | |||
@@ -27,6 +27,7 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d) | |||
27 | #endif | 27 | #endif |
28 | d->i2c_adap.algo = d->props.i2c_algo; | 28 | d->i2c_adap.algo = d->props.i2c_algo; |
29 | d->i2c_adap.algo_data = NULL; | 29 | d->i2c_adap.algo_data = NULL; |
30 | d->i2c_adap.dev.parent = &d->udev->dev; | ||
30 | 31 | ||
31 | i2c_set_adapdata(&d->i2c_adap, d); | 32 | i2c_set_adapdata(&d->i2c_adap, d); |
32 | 33 | ||
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c index 60820deb900b..b60cdc93d6db 100644 --- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | |||
@@ -1690,6 +1690,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i | |||
1690 | #endif | 1690 | #endif |
1691 | ttusb->i2c_adap.algo = &ttusb_dec_algo; | 1691 | ttusb->i2c_adap.algo = &ttusb_dec_algo; |
1692 | ttusb->i2c_adap.algo_data = NULL; | 1692 | ttusb->i2c_adap.algo_data = NULL; |
1693 | ttusb->i2c_adap.dev.parent = &udev->dev; | ||
1693 | 1694 | ||
1694 | result = i2c_add_adapter(&ttusb->i2c_adap); | 1695 | result = i2c_add_adapter(&ttusb->i2c_adap); |
1695 | if (result) { | 1696 | if (result) { |