staing: gpib: struct typing for gpib_board_config
authorMichael Rubin <matchstick@neverthere.org>
Tue, 8 Apr 2025 22:36:41 +0000 (22:36 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2025 14:35:50 +0000 (16:35 +0200)
Using Linux code style for gpib_board_config struct in .h to allow drivers to
migrate.

Adhering to Linux code style.

In general, a pointer, or a struct that has elements that can reasonably be
directly accessed should never be a typedef.

Reported by CheckPatch

WARNING: do not add new typedefs

Signed-off-by: Michael Rubin <matchstick@neverthere.org>
Link: https://lore.kernel.org/r/20250408223659.187109-2-matchstick@neverthere.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gpib/include/gpib_types.h

index 2d9b9be683f8a68bab64c0117c60b1b5583ccea4..9af5fdd1497ff0fd663ffbc520099c73867b5cec 100644 (file)
 
 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 */
-typedef struct {
+struct gpib_board_config {
        /* firmware blob */
        void *init_data;
        int init_data_length;
@@ -49,7 +50,7 @@ typedef struct {
        char *device_path;
        /* serial number of hardware to attach */
        char *serial_number;
-} gpib_board_config_t;
+};
 
 struct gpib_interface_struct {
        /* name of board */