aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/mantis/mantis_i2c.c
diff options
context:
space:
mode:
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 39fabe572c2..005df1e90a1 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;