Commit 8154bad4 authored by Manu Abraham's avatar Manu Abraham Committed by Mauro Carvalho Chehab

V4L/DVB (13715): [Mantis] Kernel I2C changes: use PCI parent device

Signed-off-by: default avatarManu Abraham <manu@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 33c79630
...@@ -161,11 +161,15 @@ static struct i2c_adapter mantis_i2c_adapter = { ...@@ -161,11 +161,15 @@ static struct i2c_adapter mantis_i2c_adapter = {
int __devinit mantis_i2c_init(struct mantis_pci *mantis) int __devinit mantis_i2c_init(struct mantis_pci *mantis)
{ {
u32 intstat, intmask; u32 intstat, intmask;
struct i2c_adapter *i2c_adapter = &mantis->adapter;
struct pci_dev *pdev = mantis->pdev;
mutex_init(&mantis->i2c_lock); mutex_init(&mantis->i2c_lock);
memcpy(&mantis->adapter, &mantis_i2c_adapter, sizeof (mantis_i2c_adapter)); memcpy(i2c_adapter, &mantis_i2c_adapter, sizeof (mantis_i2c_adapter));
i2c_set_adapdata(&mantis->adapter, mantis); i2c_set_adapdata(i2c_adapter, mantis);
mantis->i2c_rc = i2c_add_adapter(&mantis->adapter);
i2c_adapter->dev.parent = &pdev->dev;
mantis->i2c_rc = i2c_add_adapter(i2c_adapter);
if (mantis->i2c_rc < 0) if (mantis->i2c_rc < 0)
return mantis->i2c_rc; return mantis->i2c_rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment