diff options
| author | Michael Rubin <matchstick@neverthere.org> | 2025-04-09 08:58:52 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-04-15 17:46:08 +0300 |
| commit | c39eabbffeca621f54bb5a4477a43fdf9e253e47 (patch) | |
| tree | 4ae24f1cb93d455a918a55722cd4d921963c4d48 | |
| parent | 770b63fd93739d5ba48241faa8ecb8cf716ad95e (diff) | |
| download | linux-c39eabbffeca621f54bb5a4477a43fdf9e253e47.tar.xz | |
staging: gpib: Using struct gpib_board_info_ioctl
Using Linux code style for 'struct gpib_board_info_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-11-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -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 25d9e885ec00..4b062fd70ec2 100644 --- a/drivers/staging/gpib/common/gpib_os.c +++ b/drivers/staging/gpib/common/gpib_os.c @@ -1762,7 +1762,7 @@ static int query_board_rsv_ioctl(struct gpib_board *board, unsigned long arg) static int board_info_ioctl(const struct gpib_board *board, unsigned long arg) { - board_info_ioctl_t info; + struct gpib_board_info_ioctl info; int retval; info.pad = board->pad; diff --git a/drivers/staging/gpib/uapi/gpib_ioctl.h b/drivers/staging/gpib/uapi/gpib_ioctl.h index e3d167edfd69..041b0a1593e9 100644 --- a/drivers/staging/gpib/uapi/gpib_ioctl.h +++ b/drivers/staging/gpib/uapi/gpib_ioctl.h @@ -70,7 +70,7 @@ struct gpib_spoll_bytes_ioctl { int sad; }; -typedef struct { +struct gpib_board_info_ioctl { unsigned int pad; int sad; int parallel_poll_configuration; @@ -79,7 +79,7 @@ typedef struct { unsigned int t1_delay; unsigned ist : 1; unsigned no_7_bit_eos : 1; -} board_info_ioctl_t; +}; typedef struct { int pci_bus; @@ -148,7 +148,7 @@ enum gpib_ioctl { IBMUTEX = _IOW(GPIB_CODE, 26, int), IBSPOLL_BYTES = _IOWR(GPIB_CODE, 27, struct gpib_spoll_bytes_ioctl), IBPPC = _IOW(GPIB_CODE, 28, ppoll_config_ioctl_t), - IBBOARD_INFO = _IOR(GPIB_CODE, 29, board_info_ioctl_t), + IBBOARD_INFO = _IOR(GPIB_CODE, 29, struct gpib_board_info_ioctl), IBQUERY_BOARD_RSV = _IOR(GPIB_CODE, 31, int), IBSELECT_PCI = _IOWR(GPIB_CODE, 32, select_pci_ioctl_t), |
