mfd: lpc_ich: Make struct lpc_ich_priv use enum for chipset member
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 26 Sep 2023 19:08:31 +0000 (22:08 +0300)
committerLee Jones <lee@kernel.org>
Wed, 1 Nov 2023 10:02:13 +0000 (10:02 +0000)
We have a specific enum for the supported chipsets.
Make struct lpc_ich_priv use better type for the chipset member.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230926190834.932233-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/lpc_ich.c

index 7b1c597b6879fb38d6c9a3a34e2d6baa9ade66d1..58da6c95c46253a9d6680cdc216f5d1c240a78d6 100644 (file)
 #define wdt_mem_res(i) wdt_res(ICH_RES_MEM_OFF, i)
 #define wdt_res(b, i) (&wdt_ich_res[(b) + (i)])
 
-struct lpc_ich_priv {
-       int chipset;
-
-       int abase;              /* ACPI base */
-       int actrl_pbase;        /* ACPI control or PMC base */
-       int gbase;              /* GPIO base */
-       int gctrl;              /* GPIO control */
-
-       int abase_save;         /* Cached ACPI base value */
-       int actrl_pbase_save;           /* Cached ACPI control or PMC base value */
-       int gctrl_save;         /* Cached GPIO control value */
-};
-
 static struct resource wdt_ich_res[] = {
        /* ACPI - TCO */
        {
@@ -293,6 +280,19 @@ enum lpc_chipsets {
        LPC_COUGARMOUNTAIN,/* Cougar Mountain SoC*/
 };
 
+struct lpc_ich_priv {
+       enum lpc_chipsets chipset;
+
+       int abase;              /* ACPI base */
+       int actrl_pbase;        /* ACPI control or PMC base */
+       int gbase;              /* GPIO base */
+       int gctrl;              /* GPIO control */
+
+       int abase_save;         /* Cached ACPI base value */
+       int actrl_pbase_save;           /* Cached ACPI control or PMC base value */
+       int gctrl_save;         /* Cached GPIO control value */
+};
+
 static struct lpc_ich_info lpc_chipset_info[] = {
        [LPC_ICH] = {
                .name = "ICH",