diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-08-03 15:34:41 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2019-06-22 23:54:40 -0700 |
commit | 501025df2e774ea840276e08d2a0aead606ffa52 (patch) | |
tree | 766c3695e39dbf927a62292e7ac4fd119575c632 /drivers/input/joystick/iforce/iforce-main.c | |
parent | 05ca38283afa5ad11de88395cf0b28c192766bc1 (diff) | |
download | linux-501025df2e774ea840276e08d2a0aead606ffa52.tar.bz2 |
Input: iforce - add bus type and parent arguments to iforce_init_device()
Note that the parent device for the USB-connected controllers is now
USB interface instead of USB device.
Tested-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/joystick/iforce/iforce-main.c')
-rw-r--r-- | drivers/input/joystick/iforce/iforce-main.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/input/joystick/iforce/iforce-main.c b/drivers/input/joystick/iforce/iforce-main.c index 4401ca4a4c38..894769d03df3 100644 --- a/drivers/input/joystick/iforce/iforce-main.c +++ b/drivers/input/joystick/iforce/iforce-main.c @@ -221,7 +221,8 @@ static void iforce_close(struct input_dev *dev) iforce->xport_ops->stop_io(iforce); } -int iforce_init_device(struct iforce *iforce) +int iforce_init_device(struct device *parent, u16 bustype, + struct iforce *iforce) { struct input_dev *input_dev; struct ff_device *ff; @@ -243,20 +244,8 @@ int iforce_init_device(struct iforce *iforce) * Input device fields. */ - switch (iforce->bus) { -#ifdef CONFIG_JOYSTICK_IFORCE_USB - case IFORCE_USB: - input_dev->id.bustype = BUS_USB; - input_dev->dev.parent = &iforce->usbdev->dev; - break; -#endif -#ifdef CONFIG_JOYSTICK_IFORCE_232 - case IFORCE_232: - input_dev->id.bustype = BUS_RS232; - input_dev->dev.parent = &iforce->serio->dev; - break; -#endif - } + input_dev->id.bustype = bustype; + input_dev->dev.parent = parent; input_set_drvdata(input_dev, iforce); |