summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Rubin <matchstick@neverthere.org>2025-04-09 08:58:50 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-15 17:46:08 +0300
commit7e17963fa99086e809d70191417aa9ef77f1db58 (patch)
treeb5f9345165323b137ad710f65c576fbb9a227e75
parent15738cb610430ea52f3eb8ccc994fd3bc02c91f6 (diff)
downloadlinux-7e17963fa99086e809d70191417aa9ef77f1db58.tar.xz
staging: gpib: Using struct gpib_online_ioctl
Using Linux code style for 'struct gpib_online_ioctl' to remove typedef. Adhering to Linux code style. Reported by checkpatch.pl In general, a pointer, or a struct that has elements that can reasonably be directly accessed should never be a typedef. Signed-off-by: Michael Rubin <matchstick@neverthere.org> Link: https://lore.kernel.org/r/20250409055903.321438-9-matchstick@neverthere.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/gpib/common/gpib_os.c2
-rw-r--r--drivers/staging/gpib/uapi/gpib_ioctl.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/gpib/common/gpib_os.c b/drivers/staging/gpib/common/gpib_os.c
index 70fa66f70780..a8189f296cf9 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1353,7 +1353,7 @@ static int parallel_poll_ioctl(struct gpib_board *board, unsigned long arg)
static int online_ioctl(struct gpib_board *board, unsigned long arg)
{
- online_ioctl_t online_cmd;
+ struct gpib_online_ioctl online_cmd;
int retval;
void __user *init_data = NULL;
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 71c5e3d020bb..dab170b09764 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -58,11 +58,11 @@ struct gpib_wait_ioctl {
unsigned int usec_timeout;
};
-typedef struct {
+struct gpib_online_ioctl {
uint64_t init_data_ptr;
int init_data_length;
int online;
-} online_ioctl_t;
+};
typedef struct {
unsigned int num_bytes;
@@ -158,7 +158,7 @@ enum gpib_ioctl {
IBLOC = _IO(GPIB_CODE, 36),
IBAUTOSPOLL = _IOW(GPIB_CODE, 38, autospoll_ioctl_t),
- IBONL = _IOW(GPIB_CODE, 39, online_ioctl_t),
+ IBONL = _IOW(GPIB_CODE, 39, struct gpib_online_ioctl),
IBPP2_SET = _IOW(GPIB_CODE, 40, local_ppoll_mode_ioctl_t),
IBPP2_GET = _IOR(GPIB_CODE, 41, local_ppoll_mode_ioctl_t),
IBSELECT_DEVICE_PATH = _IOW(GPIB_CODE, 43, select_device_path_ioctl_t),