From 38d107690df7f0826adb5b53f4e87676859ff0a6 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 26 Jul 2018 17:36:36 -0700 Subject: Input: iforce - introduce transport ops In order to tease apart the driver into core and transport modules, let's introduce transport operations and make "xmit" the very first one such operation. Tested-by: Tim Schumacher Signed-off-by: Dmitry Torokhov --- drivers/input/joystick/iforce/iforce.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/input/joystick/iforce/iforce.h') diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h index 0e9d01f8bcb6..2fea3be751ed 100644 --- a/drivers/input/joystick/iforce/iforce.h +++ b/drivers/input/joystick/iforce/iforce.h @@ -93,9 +93,16 @@ struct iforce_device { signed short *ff; }; +struct iforce; + +struct iforce_xport_ops { + void (*xmit)(struct iforce *iforce); +}; + struct iforce { struct input_dev *dev; /* Input device interface */ struct iforce_device *type; + const struct iforce_xport_ops *xport_ops; int bus; unsigned char data[IFORCE_MAX_LENGTH]; @@ -141,12 +148,6 @@ struct iforce { /* Public functions */ -/* iforce-serio.c */ -void iforce_serial_xmit(struct iforce *iforce); - -/* iforce-usb.c */ -void iforce_usb_xmit(struct iforce *iforce); - /* iforce-main.c */ int iforce_init_device(struct iforce *iforce); -- cgit v1.2.3-59-g8ed1b