Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2304028rdh; Tue, 26 Sep 2023 20:52:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0tNVzll9HltJasnbOPTqXR7kZJqVrxbQ5jnvOKVWAyz4N4bd4vWZUJE8/HxJw3/FB/P3Y X-Received: by 2002:a17:90a:fb86:b0:26f:4685:5b69 with SMTP id cp6-20020a17090afb8600b0026f46855b69mr570448pjb.7.1695786753392; Tue, 26 Sep 2023 20:52:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695786753; cv=none; d=google.com; s=arc-20160816; b=rZNP+rAIZmeNcvUP7Q2uj90LWXf1/sKRLqWeqmG9ym2d5t6TEfofjDcy7q++XSFi6c ynnPs2PBQ0j+9qy9ulkVX3dTtvpuJ0E9fwHNvBSi7duklC9jplFjw09JZGJsei/e/QV7 QiM3FBIDLmixXJmeY8qo+Ui1rbmxfx+Dk79Yl32Dg79euHvNLNxA0bMRzCnGnQfTuk5L IxldPw6S58ORJK00WU5Ui+3ONJK0JKGYFzB2asS8kaRkVYetnJ7NRb87xIwEovgHsniA p6MqpmdqLZeFdtCgbh09vBAENtOCJTn6wsy+nlVPcwyTUx8Frm2zc37SlSo7aqhW4r+7 SQQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=HvRW2rX0soTYyq5SvfTcvF1C0DSRMV7mYXYNychVyuc=; fh=LnReewwy2kxiFBwYYoWSb8WRGE1pjOFvwxtFbGjcaS0=; b=aoHeVveZw3JkBPr5pQ/UE+sUjCLWNMM9hSR8lJi4S+sf4MLQ9f5MXfSCbrf6Ooy7fR M+VUJzYM6kBFeXC76p+71TS8fcBbT5D/kKmA1BstlRda4YEyMNbW50soF/d+bLAzYPBD GQT6trbKI7emqwPkh5yzDylCWZ9JooHoTpjQH1Dz3tc7NsJRvzcVmde0HeBZzpbG4jMM 9jM/197LaELp3rKjOBJO3ruyQfGuNkcgmlcordXfXu1QD7MDnshKw/AMpnR6VP7iYy3B Od1qUVtRD3HHy5QfyUekVxzClKu2rNZ1s4Jd2NVRyOSP9GmaJDtG+1rNfJ8TnwkVrjBq F4zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nuTDCbkJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id h4-20020a170902680400b001c62d935854si3415910plk.614.2023.09.26.20.52.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 20:52:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nuTDCbkJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 2A6F98325D3F; Tue, 26 Sep 2023 12:09:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235757AbjIZTJC (ORCPT + 99 others); Tue, 26 Sep 2023 15:09:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235733AbjIZTI5 (ORCPT ); Tue, 26 Sep 2023 15:08:57 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F59619C for ; Tue, 26 Sep 2023 12:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695755331; x=1727291331; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=CMTUrZR7eBDMX5WaZoCRwZyAKgtxTJw9+oHxgnQvwTc=; b=nuTDCbkJRvDmzZ4p1hm1bNueyynmaa3R85FmWecvA3ZEB5AhpDby9/86 PQ9T+uZIOZWeU2zFZ9f6dXxj0RsFNlxSwqENvpAXssGYDkgNmlW1Z9aQH oTKXvNHH9pFbzSzKOGlGr53fYb7Vjs1phnKh6gw8GBWMyzmIISNLY6nts 6SMAbVQ4A0NY7KtBVPir8/LytcoE6KW0W8sHSBFJfA9nhbFodhTddxUKu 5rALaIozGhhA33Zj8YebPjpu/2FBJaj9MiuKYCFyzDS0Wi8xFGh4eEIIF V/WGItRzNIpHNYl/0LUphex1hWXwptEa8vbgthr+tR8QxT088jLG8DBye g==; X-IronPort-AV: E=McAfee;i="6600,9927,10845"; a="412562229" X-IronPort-AV: E=Sophos;i="6.03,178,1694761200"; d="scan'208";a="412562229" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2023 12:08:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10845"; a="784056117" X-IronPort-AV: E=Sophos;i="6.03,178,1694761200"; d="scan'208";a="784056117" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 26 Sep 2023 12:08:45 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 069C311D; Tue, 26 Sep 2023 22:08:43 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , linux-kernel@vger.kernel.org Cc: Peter Tyser , Lee Jones , Takashi Iwai Subject: [PATCH v1 1/4] mfd: lpc_ich: Make struct lpc_ich_priv use enum for chipset member Date: Tue, 26 Sep 2023 22:08:31 +0300 Message-Id: <20230926190834.932233-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 26 Sep 2023 12:09:07 -0700 (PDT) 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 --- drivers/mfd/lpc_ich.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c index 7b1c597b6879..58da6c95c462 100644 --- a/drivers/mfd/lpc_ich.c +++ b/drivers/mfd/lpc_ich.c @@ -85,19 +85,6 @@ #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", -- 2.40.0.1.gaa8946217a0b