Input: tsc2005 - set up parent device
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 17 Mar 2011 05:09:25 +0000 (22:09 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 17 Mar 2011 06:28:30 +0000 (23:28 -0700)
Set up SPI device as parent of the input device so it gets placed into
proper place in sysfs tree.

Tested-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/touchscreen/tsc2005.c

index 732c81e9a3e63e86950ef7ccb0e84672671ca837..e294648a97c9593a9d037fddc2cf28604443a48c 100644 (file)
@@ -555,6 +555,7 @@ static int __devinit tsc2005_setup(struct tsc2005 *ts,
        snprintf(ts->phys, sizeof(ts->phys), "%s/input-ts",
                 dev_name(&ts->spi->dev));
        ts->idev->phys = ts->phys;
+       ts->idev->dev.parent = &ts->spi->dev;
        ts->idev->evbit[0] = BIT(EV_ABS) | BIT(EV_KEY);
        ts->idev->absbit[0] = BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
        ts->idev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH);