summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
diff options
context:
space:
mode:
authorTomasz Figa2014-09-23 21:05:41 +0200
committerTomasz Figa2014-11-09 13:30:15 +0100
commit8100cf47698fedbde6dc3fa540b1fefcee69fd40 (patch)
treefa53c113ac0c37c15c26eae99940332d5c7f4d7b /drivers/pinctrl/samsung/pinctrl-s3c64xx.c
parentpinctrl: samsung: Constify samsung_pin_ctrl struct (diff)
downloadkernel-qcow2-linux-8100cf47698fedbde6dc3fa540b1fefcee69fd40.tar.gz
kernel-qcow2-linux-8100cf47698fedbde6dc3fa540b1fefcee69fd40.tar.xz
kernel-qcow2-linux-8100cf47698fedbde6dc3fa540b1fefcee69fd40.zip
pinctrl: samsung: Separate per-bank init and runtime data
Currently the driver mixes constant init data with runtime data, which is far from being elegant and can invite potential hard to track issues. This patch intends to solve this by introducing a new samsung_pin_bank_data structure to hold only constant data known at compile time, which can be copied to main samsung_pin_bank struct used at runtime. In addition, thanks to this change, all per-bank initdata can be marked with const and __initconst keywords and dropped after init completes. Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Diffstat (limited to 'drivers/pinctrl/samsung/pinctrl-s3c64xx.c')
-rw-r--r--drivers/pinctrl/samsung/pinctrl-s3c64xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
index 14c3f9823cc5..7756c1e9e763 100644
--- a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
+++ b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c
@@ -780,7 +780,7 @@ static int s3c64xx_eint_eint0_init(struct samsung_pinctrl_drv_data *d)
}
/* pin banks of s3c64xx pin-controller 0 */
-static struct samsung_pin_bank s3c64xx_pin_banks0[] = {
+static const struct samsung_pin_bank_data s3c64xx_pin_banks0[] __initconst = {
PIN_BANK_4BIT_EINTG(8, 0x000, "gpa", 0),
PIN_BANK_4BIT_EINTG(7, 0x020, "gpb", 8),
PIN_BANK_4BIT_EINTG(8, 0x040, "gpc", 16),