From: AngeloGioacchino Del Regno Date: Sat, 9 Apr 2022 01:32:58 +0000 (-0700) Subject: Input: mt6779-keypad - move iomem pointer to probe function X-Git-Tag: v6.6.17~3754^2~62^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db6c4ee7838c3a91ef15777f8d0f80a3cd5d3bb8;p=platform%2Fkernel%2Flinux-rpi.git Input: mt6779-keypad - move iomem pointer to probe function The mmio base address is used for the only purpose of initializing regmap for this driver, hence it's not necessary to have it in the main driver structure, as it is used only in the probe() callback. Move it local to function mt6779_keypad_pdrv_probe(). This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Mattijs Korpershoek Link: https://lore.kernel.org/r/20220406115654.115093-1-angelogioacchino.delregno@collabora.com Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/keyboard/mt6779-keypad.c b/drivers/input/keyboard/mt6779-keypad.c index 0dbbddc..2e7c918 100644 --- a/drivers/input/keyboard/mt6779-keypad.c +++ b/drivers/input/keyboard/mt6779-keypad.c @@ -24,7 +24,6 @@ struct mt6779_keypad { struct regmap *regmap; struct input_dev *input_dev; struct clk *clk; - void __iomem *base; u32 n_rows; u32 n_cols; DECLARE_BITMAP(keymap_state, MTK_KPD_NUM_BITS); @@ -91,6 +90,7 @@ static void mt6779_keypad_clk_disable(void *data) static int mt6779_keypad_pdrv_probe(struct platform_device *pdev) { struct mt6779_keypad *keypad; + void __iomem *base; int irq; u32 debounce; bool wakeup; @@ -100,11 +100,11 @@ static int mt6779_keypad_pdrv_probe(struct platform_device *pdev) if (!keypad) return -ENOMEM; - keypad->base = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(keypad->base)) - return PTR_ERR(keypad->base); + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); - keypad->regmap = devm_regmap_init_mmio(&pdev->dev, keypad->base, + keypad->regmap = devm_regmap_init_mmio(&pdev->dev, base, &mt6779_keypad_regmap_cfg); if (IS_ERR(keypad->regmap)) { dev_err(&pdev->dev,