diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-05-09 02:43:01 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-05-09 02:43:26 +0300 |
| commit | 17d6cad0b508417193ebf4d23f67c845487e9932 (patch) | |
| tree | f5097cfad0b572f57f25393f51e495fe76c694fb | |
| parent | 70867d3807b4f56b41966b95c7d642e17c691378 (diff) | |
| download | hid-tminit-17d6cad0b508417193ebf4d23f67c845487e9932.tar.gz hid-tminit-17d6cad0b508417193ebf4d23f67c845487e9932.zip | |
fix compilation on mint
+ Apparently some kernel headers are implicitly included on Debian or
something, and Mint requires explicit #include statements. Weird.
| -rw-r--r-- | hid-tminit.c | 1 | ||||
| -rw-r--r-- | tminit.c | 3 | ||||
| -rw-r--r-- | usb-tminit.c | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/hid-tminit.c b/hid-tminit.c index 68cdcd3..16c25ff 100644 --- a/hid-tminit.c +++ b/hid-tminit.c @@ -1,5 +1,6 @@ #include <linux/hid.h> #include <linux/module.h> +#include <linux/slab.h> #include "tminit.h" @@ -159,6 +159,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, @@ -170,7 +171,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 6035c08..87911a8 100644 --- a/usb-tminit.c +++ b/usb-tminit.c @@ -1,4 +1,5 @@ #include <linux/module.h> +#include <linux/slab.h> #include "tminit.h" |
