summaryrefslogtreecommitdiff
path: root/drivers/media/dvb/mantis/mantis_i2c.c
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2009-12-03 05:46:06 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-01-17 11:55:30 -0200
commit8154bad4c488c1a23fb504a6e751d71a39733b76 (patch)
tree5db0b2997a27c3833f6027eb108b9aced1ec2ebf /drivers/media/dvb/mantis/mantis_i2c.c
parent33c79630dd9fb7658dbb885a22e3a8127b16a38a (diff)
V4L/DVB (13715): [Mantis] Kernel I2C changes: use PCI parent device
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/mantis/mantis_i2c.c')
-rw-r--r--drivers/media/dvb/mantis/mantis_i2c.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/dvb/mantis/mantis_i2c.c b/drivers/media/dvb/mantis/mantis_i2c.c
index 39fabe572c2e..005df1e90a16 100644
--- a/drivers/media/dvb/mantis/mantis_i2c.c
+++ b/drivers/media/dvb/mantis/mantis_i2c.c
@@ -161,11 +161,15 @@ static struct i2c_adapter mantis_i2c_adapter = {
int __devinit mantis_i2c_init(struct mantis_pci *mantis)
{
u32 intstat, intmask;
+ struct i2c_adapter *i2c_adapter = &mantis->adapter;
+ struct pci_dev *pdev = mantis->pdev;
mutex_init(&mantis->i2c_lock);
- memcpy(&mantis->adapter, &mantis_i2c_adapter, sizeof (mantis_i2c_adapter));
- i2c_set_adapdata(&mantis->adapter, mantis);
- mantis->i2c_rc = i2c_add_adapter(&mantis->adapter);
+ memcpy(i2c_adapter, &mantis_i2c_adapter, sizeof (mantis_i2c_adapter));
+ i2c_set_adapdata(i2c_adapter, mantis);
+
+ i2c_adapter->dev.parent = &pdev->dev;
+ mantis->i2c_rc = i2c_add_adapter(i2c_adapter);
if (mantis->i2c_rc < 0)
return mantis->i2c_rc;