aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/chips
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-19 17:09:41 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:09:41 +0000
commiteade97cce3abc7682d51ea02b77703024067ebea (patch)
tree4a69f021f2a8d275da4737e0004fcccbc49e5dc5 /drivers/i2c/chips
parent8f9e8624127c40de6422da55a0bc3534ca1cc614 (diff)
tracking-2.6.25-struct-bus-type-loses-devices-member.patch
I don't know what device the symlink should be linked against on GTA01, somebody that does know needs to edit it in where it says "FIXME"... I think the supplied method can work OK otherwise. Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers/i2c/chips')
-rw-r--r--drivers/i2c/chips/pcf50606.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/i2c/chips/pcf50606.c b/drivers/i2c/chips/pcf50606.c
index 2466bf8e772..50f944fdccc 100644
--- a/drivers/i2c/chips/pcf50606.c
+++ b/drivers/i2c/chips/pcf50606.c
@@ -1781,6 +1781,12 @@ static int pcf50606_detect(struct i2c_adapter *adapter, int address, int kind)
#ifdef CONFIG_MACH_NEO1973_GTA01
if (machine_is_neo1973_gta01()) {
+ /* FIXME: what is the device name we are symlinking to?
+ * symlink won't get created until this is fixed.
+ */
+ struct device * busdev = bus_find_device_by_name(
+ &platform_bus_type,
+ NULL, "FIXME");
gta01_pm_gps_dev.dev.parent = &new_client->dev;
switch (system_rev) {
case GTA01Bv2_SYSTEM_REV:
@@ -1792,11 +1798,16 @@ static int pcf50606_detect(struct i2c_adapter *adapter, int address, int kind)
}
platform_device_register(&gta01_pm_gps_dev);
/* a link for gllin compatibility */
- err = sysfs_create_link(&platform_bus_type.devices.kobj,
- &gta01_pm_gps_dev.dev.kobj, "gta01-pm-gps.0");
- if (err)
- printk(KERN_ERR
+ /* 2.6.25 tracking: platform_bus_type.devices that was here
+ * has gone away in mainline
+ */
+ if (busdev) {
+ err = sysfs_create_link(&busdev->kobj,
+ &gta01_pm_gps_dev.dev.kobj, "gta01-pm-gps.0");
+ if (err)
+ printk(KERN_ERR
"sysfs_create_link (gta01-pm-gps.0): %d\n", err);
+ }
}
#endif