summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Rubin <matchstick@neverthere.org>2025-04-09 08:58:49 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-15 17:46:08 +0300
commit15738cb610430ea52f3eb8ccc994fd3bc02c91f6 (patch)
treef501317b06043af543e50b6a1766e80b73d498ca
parent7e9f21bb1be8a96df31a61fc4fd1a438f0993483 (diff)
downloadlinux-15738cb610430ea52f3eb8ccc994fd3bc02c91f6.tar.xz
staging: gpib: Using struct gpib_wait_ioctl
Using Linux code style for 'struct gpib_wait_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-8-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 7c6f764a6253..70fa66f70780 100644
--- a/drivers/staging/gpib/common/gpib_os.c
+++ b/drivers/staging/gpib/common/gpib_os.c
@@ -1311,7 +1311,7 @@ static int serial_poll_ioctl(struct gpib_board *board, unsigned long arg)
static int wait_ioctl(struct gpib_file_private *file_priv, struct gpib_board *board,
unsigned long arg)
{
- wait_ioctl_t wait_cmd;
+ struct gpib_wait_ioctl wait_cmd;
int retval;
struct gpib_descriptor *desc;
diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h
index 3f32eceaca93..71c5e3d020bb 100644
--- a/drivers/staging/gpib/uapi/gpib_ioctl.h
+++ b/drivers/staging/gpib/uapi/gpib_ioctl.h
@@ -47,7 +47,7 @@ struct gpib_eos_ioctl {
int eos_flags;
};
-typedef struct {
+struct gpib_wait_ioctl {
int handle;
int wait_mask;
int clear_mask;
@@ -56,7 +56,7 @@ typedef struct {
int pad;
int sad;
unsigned int usec_timeout;
-} wait_ioctl_t;
+};
typedef struct {
uint64_t init_data_ptr;
@@ -126,7 +126,7 @@ enum gpib_ioctl {
IBCMD = _IOWR(GPIB_CODE, 102, struct gpib_read_write_ioctl),
IBOPENDEV = _IOWR(GPIB_CODE, 3, struct gpib_open_dev_ioctl),
IBCLOSEDEV = _IOW(GPIB_CODE, 4, struct gpib_close_dev_ioctl),
- IBWAIT = _IOWR(GPIB_CODE, 5, wait_ioctl_t),
+ IBWAIT = _IOWR(GPIB_CODE, 5, struct gpib_wait_ioctl),
IBRPP = _IOWR(GPIB_CODE, 6, uint8_t),
IBSIC = _IOW(GPIB_CODE, 9, unsigned int),