1 From e7e0525a9ddbb82b24216af5182353a345dca59f Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Fri, 25 Jul 2008 23:06:06 +0100
4 Subject: [PATCH] tracking-2.6.25-struct-bus-type-loses-devices-member.patch
6 I don't know what device the symlink should be linked
7 against on GTA01, somebody that does know needs to edit
8 it in where it says "FIXME"... I think the supplied method
11 Signed-off-by: Andy Green <andy@openmoko.com>
13 drivers/i2c/chips/pcf50606.c | 19 +++++++++++++++----
14 1 files changed, 15 insertions(+), 4 deletions(-)
16 diff --git a/drivers/i2c/chips/pcf50606.c b/drivers/i2c/chips/pcf50606.c
17 index 2466bf8..50f944f 100644
18 --- a/drivers/i2c/chips/pcf50606.c
19 +++ b/drivers/i2c/chips/pcf50606.c
20 @@ -1781,6 +1781,12 @@ static int pcf50606_detect(struct i2c_adapter *adapter, int address, int kind)
22 #ifdef CONFIG_MACH_NEO1973_GTA01
23 if (machine_is_neo1973_gta01()) {
24 + /* FIXME: what is the device name we are symlinking to?
25 + * symlink won't get created until this is fixed.
27 + struct device * busdev = bus_find_device_by_name(
30 gta01_pm_gps_dev.dev.parent = &new_client->dev;
32 case GTA01Bv2_SYSTEM_REV:
33 @@ -1792,11 +1798,16 @@ static int pcf50606_detect(struct i2c_adapter *adapter, int address, int kind)
35 platform_device_register(>a01_pm_gps_dev);
36 /* a link for gllin compatibility */
37 - err = sysfs_create_link(&platform_bus_type.devices.kobj,
38 - >a01_pm_gps_dev.dev.kobj, "gta01-pm-gps.0");
41 + /* 2.6.25 tracking: platform_bus_type.devices that was here
42 + * has gone away in mainline
45 + err = sysfs_create_link(&busdev->kobj,
46 + >a01_pm_gps_dev.dev.kobj, "gta01-pm-gps.0");
49 "sysfs_create_link (gta01-pm-gps.0): %d\n", err);