aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/scx200_acb.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-02-13 16:09:03 -0500
committerJean Delvare <khali@arrakis.delvare>2007-02-13 16:09:03 -0500
commit12a917f69d1468c91d646dbad8408dd0d39d6207 (patch)
tree3336f373d174600d0981d8a34de4cf0e26eab79f /drivers/i2c/busses/scx200_acb.c
parentbeb58aa39e6e5a52875defe12c7697b0bfa95d4c (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/i2c/busses/scx200_acb.c')
-rw-r--r--drivers/i2c/busses/scx200_acb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c
index 714bae780953..0b082c5a0195 100644
--- a/drivers/i2c/busses/scx200_acb.c
+++ b/drivers/i2c/busses/scx200_acb.c
@@ -428,7 +428,7 @@ static __init int scx200_acb_probe(struct scx200_acb_iface *iface)
428} 428}
429 429
430static __init struct scx200_acb_iface *scx200_create_iface(const char *text, 430static __init struct scx200_acb_iface *scx200_create_iface(const char *text,
431 int index) 431 struct device *dev, int index)
432{ 432{
433 struct scx200_acb_iface *iface; 433 struct scx200_acb_iface *iface;
434 struct i2c_adapter *adapter; 434 struct i2c_adapter *adapter;
@@ -446,6 +446,7 @@ static __init struct scx200_acb_iface *scx200_create_iface(const char *text,
446 adapter->id = I2C_HW_SMBUS_SCX200; 446 adapter->id = I2C_HW_SMBUS_SCX200;
447 adapter->algo = &scx200_acb_algorithm; 447 adapter->algo = &scx200_acb_algorithm;
448 adapter->class = I2C_CLASS_HWMON; 448 adapter->class = I2C_CLASS_HWMON;
449 adapter->dev.parent = dev;
449 450
450 mutex_init(&iface->mutex); 451 mutex_init(&iface->mutex);
451 452
@@ -486,7 +487,7 @@ static __init int scx200_create_pci(const char *text, struct pci_dev *pdev,
486 struct scx200_acb_iface *iface; 487 struct scx200_acb_iface *iface;
487 int rc; 488 int rc;
488 489
489 iface = scx200_create_iface(text, 0); 490 iface = scx200_create_iface(text, &pdev->dev, 0);
490 491
491 if (iface == NULL) 492 if (iface == NULL)
492 return -ENOMEM; 493 return -ENOMEM;
@@ -524,7 +525,7 @@ static int __init scx200_create_isa(const char *text, unsigned long base,
524 struct scx200_acb_iface *iface; 525 struct scx200_acb_iface *iface;
525 int rc; 526 int rc;
526 527
527 iface = scx200_create_iface(text, index); 528 iface = scx200_create_iface(text, NULL, index);
528 529
529 if (iface == NULL) 530 if (iface == NULL)
530 return -ENOMEM; 531 return -ENOMEM;