Commit db6c4ee7 authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Dmitry Torokhov

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: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: default avatarMattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20220406115654.115093-1-angelogioacchino.delregno@collabora.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent a949087c
...@@ -24,7 +24,6 @@ struct mt6779_keypad { ...@@ -24,7 +24,6 @@ struct mt6779_keypad {
struct regmap *regmap; struct regmap *regmap;
struct input_dev *input_dev; struct input_dev *input_dev;
struct clk *clk; struct clk *clk;
void __iomem *base;
u32 n_rows; u32 n_rows;
u32 n_cols; u32 n_cols;
DECLARE_BITMAP(keymap_state, MTK_KPD_NUM_BITS); DECLARE_BITMAP(keymap_state, MTK_KPD_NUM_BITS);
...@@ -91,6 +90,7 @@ static void mt6779_keypad_clk_disable(void *data) ...@@ -91,6 +90,7 @@ static void mt6779_keypad_clk_disable(void *data)
static int mt6779_keypad_pdrv_probe(struct platform_device *pdev) static int mt6779_keypad_pdrv_probe(struct platform_device *pdev)
{ {
struct mt6779_keypad *keypad; struct mt6779_keypad *keypad;
void __iomem *base;
int irq; int irq;
u32 debounce; u32 debounce;
bool wakeup; bool wakeup;
...@@ -100,11 +100,11 @@ static int mt6779_keypad_pdrv_probe(struct platform_device *pdev) ...@@ -100,11 +100,11 @@ static int mt6779_keypad_pdrv_probe(struct platform_device *pdev)
if (!keypad) if (!keypad)
return -ENOMEM; return -ENOMEM;
keypad->base = devm_platform_ioremap_resource(pdev, 0); base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(keypad->base)) if (IS_ERR(base))
return PTR_ERR(keypad->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); &mt6779_keypad_regmap_cfg);
if (IS_ERR(keypad->regmap)) { if (IS_ERR(keypad->regmap)) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment