diff options
| -rw-r--r-- | .gitignore | 5 | ||||
| -rw-r--r-- | hid-tminit.c | 3 | ||||
| -rw-r--r-- | tminit.c | 3 | ||||
| -rw-r--r-- | usb-tminit.c | 3 |
4 files changed, 12 insertions, 2 deletions
@@ -3,5 +3,8 @@ build/* .idea *.o *.ko -*.mod +*.mod* +*.orig *.cmd +Module.symvers +modules.order diff --git a/hid-tminit.c b/hid-tminit.c index a8b103e..16c25ff 100644 --- a/hid-tminit.c +++ b/hid-tminit.c @@ -1,4 +1,7 @@ #include <linux/hid.h> +#include <linux/module.h> +#include <linux/slab.h> + #include "tminit.h" static int thrustmaster_hid_probe(struct hid_device *hdev, const struct hid_device_id *id) @@ -160,6 +160,7 @@ static void thrustmaster_change_handler(struct urb *urb) static int thrustmaster_submit_change(struct tm_wheel *tm_wheel, uint16_t switch_value) { + int ret = 0; tm_wheel->change_request->wValue = cpu_to_le16(switch_value); usb_fill_control_urb( tm_wheel->urb, @@ -171,7 +172,7 @@ static int thrustmaster_submit_change(struct tm_wheel *tm_wheel, uint16_t switch tm_wheel ); - int ret = usb_submit_urb(tm_wheel->urb, GFP_ATOMIC); + ret = usb_submit_urb(tm_wheel->urb, GFP_ATOMIC); if (ret) dev_err(&tm_wheel->interface->dev, "Error %d while submitting the change URB." diff --git a/usb-tminit.c b/usb-tminit.c index dad3426..fae8820 100644 --- a/usb-tminit.c +++ b/usb-tminit.c @@ -1,3 +1,6 @@ +#include <linux/module.h> +#include <linux/slab.h> + #include "tminit.h" static int thrustmaster_usb_probe(struct usb_interface *interface, const struct usb_device_id *id) |
