Skip to contentSkip to conversation

uinput: Remove local copy of uinput.h

PATCH In review Luiz Augusto von Dentz 2 participants 2 messages Nov 22, 2021 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 uinput: Remove local copy of uinput.h

From: Luiz Augusto von Dentz <[email protected]>

uinput.h is part of kernel uapi nowadays so it can be included directly from linux/uinput.h which has a compatible definition with 32 bits systems:

https://github.com/bluez/bluez/issues/84#issuecomment-942155841

---
 android/avctp.c        |   8 +-
 profiles/audio/avctp.c |   6 +-
 src/uinput.h           | 711 -----------------------------------------
 3 files changed, 6 insertions(+), 719 deletions(-)
 delete mode 100644 src/uinput.h
android/avctp.c +3 -5
index c2ea5f4a2..14ebbc391 100644
@@ -26,14 +26,12 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <netinet/in.h>
+#include <linux/uinput.h>
 
 #include <glib.h>
 
 #include "lib/sdp.h"
-
 #include "src/log.h"
-#include "src/uinput.h"
-
 #include "avctp.h"
 
 /*
@@ -259,7 +257,7 @@ static gboolean avctp_passthrough_rsp(struct avctp *session, uint8_t code,
 
 static int send_event(int fd, uint16_t type, uint16_t code, int32_t value)
 {
-	struct uinput_event event;
+	struct input_event event;
 	int err;
 
 	memset(&event, 0, sizeof(event));
@@ -1012,7 +1010,7 @@ failed:
 
 static int uinput_create(const char *name)
 {
-	struct uinput_dev dev;
+	struct uinput_user_dev dev;
 	int fd, err, i;
 
 	fd = open("/dev/uinput", O_RDWR);
profiles/audio/avctp.c +3 -3
index 72509edec..9113b5ddc 100644
@@ -25,6 +25,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <netinet/in.h>
+#include <linux/uinput.h>
 
 #include <glib.h>
 
@@ -38,7 +39,6 @@
 #include "src/device.h"
 #include "src/log.h"
 #include "src/error.h"
-#include "src/uinput.h"
 #include "src/shared/timeout.h"
 
 #include "avctp.h"
@@ -302,7 +302,7 @@ static gboolean avctp_passthrough_rsp(struct avctp *session, uint8_t code,
 
 static int send_event(int fd, uint16_t type, uint16_t code, int32_t value)
 {
-	struct uinput_event event;
+	struct input_event event;
 
 	memset(&event, 0, sizeof(event));
 	event.type	= type;
@@ -1156,7 +1156,7 @@ failed:
 static int uinput_create(struct btd_device *device, const char *name,
 			 const char *suffix)
 {
-	struct uinput_dev dev;
+	struct uinput_user_dev dev;
 	int fd, err, i;
 	char src[18];
 
src/uinput.h deleted +0 -711

711 lines not on this page · raw message

Signature · 1 line
2.33.1
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=584127

---Test result---

Test Summary:

CheckPatch                    PASS      1.57 seconds
GitLint                       PASS      1.25 seconds
Prep - Setup ELL              PASS      43.71 seconds
Build - Prep                  PASS      0.50 seconds
Build - Configure             PASS      8.28 seconds
Build - Make                  PASS      189.41 seconds
Make Check                    PASS      9.78 seconds
Make Distcheck                FAIL      11.13 seconds
Build w/ext ELL - Configure   PASS      8.40 seconds
Build w/ext ELL - Make        PASS      178.62 seconds

Details
##############################
Test: Make Distcheck - FAIL
Desc: Run distcheck to check the distribution
Output:
make[2]: *** No rule to make target 'src/uinput.h', needed by 'distdir-am'. Stop. make[1]: *** [Makefile:10334: distdir] Error 2
make: *** [Makefile:10410: dist] Error 2

---
Regards,
Linux Bluetooth