changed Makefile and profiles, added patches for kernel 2.6.24
[openwrt/svn-archive/archive.git] / target / linux / s3c24xx / patches-2.6.26 / 0123-tracking-2.6.25-struct-bus-type-loses-devices-member.patch
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
5
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
9 can work OK otherwise.
10
11 Signed-off-by: Andy Green <andy@openmoko.com>
12 ---
13 drivers/i2c/chips/pcf50606.c | 19 +++++++++++++++----
14 1 files changed, 15 insertions(+), 4 deletions(-)
15
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)
21
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.
26 + */
27 + struct device * busdev = bus_find_device_by_name(
28 + &platform_bus_type,
29 + NULL, "FIXME");
30 gta01_pm_gps_dev.dev.parent = &new_client->dev;
31 switch (system_rev) {
32 case GTA01Bv2_SYSTEM_REV:
33 @@ -1792,11 +1798,16 @@ static int pcf50606_detect(struct i2c_adapter *adapter, int address, int kind)
34 }
35 platform_device_register(&gta01_pm_gps_dev);
36 /* a link for gllin compatibility */
37 - err = sysfs_create_link(&platform_bus_type.devices.kobj,
38 - &gta01_pm_gps_dev.dev.kobj, "gta01-pm-gps.0");
39 - if (err)
40 - printk(KERN_ERR
41 + /* 2.6.25 tracking: platform_bus_type.devices that was here
42 + * has gone away in mainline
43 + */
44 + if (busdev) {
45 + err = sysfs_create_link(&busdev->kobj,
46 + &gta01_pm_gps_dev.dev.kobj, "gta01-pm-gps.0");
47 + if (err)
48 + printk(KERN_ERR
49 "sysfs_create_link (gta01-pm-gps.0): %d\n", err);
50 + }
51 }
52 #endif
53
54 --
55 1.5.6.3
56