include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / input / touchscreen / wm97xx-core.c
index 252eb11..5109bf3 100644 (file)
@@ -48,6 +48,7 @@
 #include <linux/wm97xx.h>
 #include <linux/uaccess.h>
 #include <linux/io.h>
+#include <linux/slab.h>
 
 #define TS_NAME                        "wm97xx"
 #define WM_CORE_VERSION                "1.00"
@@ -561,6 +562,7 @@ static void wm97xx_ts_input_close(struct input_dev *idev)
 static int wm97xx_probe(struct device *dev)
 {
        struct wm97xx *wm;
+       struct wm97xx_pdata *pdata = dev->platform_data;
        int ret = 0, id = 0;
 
        wm = kzalloc(sizeof(struct wm97xx), GFP_KERNEL);
@@ -658,6 +660,7 @@ static int wm97xx_probe(struct device *dev)
        }
        platform_set_drvdata(wm->battery_dev, wm);
        wm->battery_dev->dev.parent = dev;
+       wm->battery_dev->dev.platform_data = pdata;
        ret = platform_device_add(wm->battery_dev);
        if (ret < 0)
                goto batt_reg_err;
@@ -671,6 +674,7 @@ static int wm97xx_probe(struct device *dev)
        }
        platform_set_drvdata(wm->touch_dev, wm);
        wm->touch_dev->dev.parent = dev;
+       wm->touch_dev->dev.platform_data = pdata;
        ret = platform_device_add(wm->touch_dev);
        if (ret < 0)
                goto touch_reg_err;