]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
staging: gpib: Removing typedef gpib_board_config
authorMichael Rubin <matchstick@neverthere.org>
Tue, 8 Apr 2025 22:36:58 +0000 (22:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2025 14:37:13 +0000 (16:37 +0200)
Removing gpib_interface_t to adhere 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/20250408223659.187109-19-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/include/gpib_types.h

index 9af5fdd1497ff0fd663ffbc520099c73867b5cec..f4cb346b8a0284bfc500b5b203459872b64218c7 100644 (file)
@@ -24,7 +24,6 @@
 
 typedef struct gpib_interface_struct gpib_interface_t;
 struct gpib_board;
-typedef struct gpib_board_config gpib_board_config_t;
 
 /* config parameters that are only used by driver attach functions */
 struct gpib_board_config {
@@ -56,7 +55,7 @@ struct gpib_interface_struct {
        /* name of board */
        char *name;
        /* attach() initializes board and allocates resources */
-       int (*attach)(struct gpib_board *board, const gpib_board_config_t *config);
+       int (*attach)(struct gpib_board *board, const struct gpib_board_config *config);
        /* detach() shuts down board and frees resources */
        void (*detach)(struct gpib_board *board);
        /* read() should read at most 'length' bytes from the bus into
@@ -292,7 +291,7 @@ struct gpib_board {
        struct gpib_pseudo_irq pseudo_irq;
        /* error dong autopoll */
        atomic_t stuck_srq;
-       gpib_board_config_t config;
+       struct gpib_board_config config;
        /* Flag that indicates whether board is system controller of the bus */
        unsigned master : 1;
        /* individual status bit */