diff options
| author | Michael Rubin <matchstick@neverthere.org> | 2025-04-09 05:58:48 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-15 16:46:08 +0200 |
| commit | 7e9f21bb1be8a96df31a61fc4fd1a438f0993483 (patch) | |
| tree | fecf1c04a98062e007fe1c5380aaaa8eace755c3 /drivers/staging | |
| parent | 262040faa5e9522848f6c7aa9d772a6f1995f85d (diff) | |
staging: gpib: Using struct gpib_eos_ioctl
Using Linux code style for 'struct gpib_eos_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-7-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
| -rw-r--r-- | drivers/staging/gpib/common/gpib_os.c | 2 | ||||
| -rw-r--r-- | drivers/staging/gpib/uapi/gpib_ioctl.h | 6 |
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 4e93d1c7e3d6..7c6f764a6253 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -1508,7 +1508,7 @@ static int sad_ioctl(struct gpib_board *board, struct gpib_file_private *file_pr static int eos_ioctl(struct gpib_board *board, unsigned long arg) { - eos_ioctl_t eos_cmd; + struct gpib_eos_ioctl eos_cmd; int retval; retval = copy_from_user(&eos_cmd, (void __user *)arg, sizeof(eos_cmd)); diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h index 9be3262271c5..3f32eceaca93 100644 --- a/drivers/staging/gpib/uapi/gpib_ioctl.h +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h @@ -42,10 +42,10 @@ struct gpib_serial_poll_ioctl { uint8_t status_byte; }; -typedef struct { +struct gpib_eos_ioctl { int eos; int eos_flags; -} eos_ioctl_t; +}; typedef struct { int handle; @@ -138,7 +138,7 @@ enum gpib_ioctl { IBSAD = _IOW(GPIB_CODE, 16, sad_ioctl_t), IBTMO = _IOW(GPIB_CODE, 17, unsigned int), IBRSP = _IOWR(GPIB_CODE, 18, struct gpib_serial_poll_ioctl), - IBEOS = _IOW(GPIB_CODE, 19, eos_ioctl_t), + IBEOS = _IOW(GPIB_CODE, 19, struct gpib_eos_ioctl), IBRSV = _IOW(GPIB_CODE, 20, uint8_t), CFCBASE = _IOW(GPIB_CODE, 21, uint64_t), CFCIRQ = _IOW(GPIB_CODE, 22, unsigned int), |
