diff options
Diffstat (limited to 'drivers/input/imx_keypad.c')
-rw-r--r-- | drivers/input/imx_keypad.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/input/imx_keypad.c b/drivers/input/imx_keypad.c index 6757fac72b..e57a884630 100644 --- a/drivers/input/imx_keypad.c +++ b/drivers/input/imx_keypad.c @@ -1,12 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Driver for the IMX keypad port. * Copyright (C) 2009 Alberto Panizzo <maramaopercheseimorto@gmail.com> * Copyright (C) 2012 Christian Kapeller <christian.kapeller@cmotion.eu> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * */ /* @@ -76,7 +72,6 @@ struct imx_keypad { struct input_device input; struct clk *clk; - struct device_d *dev; void __iomem *mmio_base; struct poller_struct poller; @@ -203,10 +198,6 @@ static void imx_keypad_fire_events(struct imx_keypad *keypad, input_report_key_event(&keypad->input, keypad->keycodes[code], matrix_volatile_state[col] & (1 << row)); - - dev_dbg(keypad->dev, "Event code: %d, val: %d", - keypad->keycodes[code], - matrix_volatile_state[col] & (1 << row)); } } } @@ -362,7 +353,7 @@ static void imx_keypad_inhibit(struct imx_keypad *keypad) writew(0xff00, keypad->mmio_base + KPCR); } -static int __init imx_keypad_probe(struct device_d *dev) +static int __init imx_keypad_probe(struct device *dev) { struct resource *iores; struct imx_keypad *keypad; @@ -371,7 +362,6 @@ static int __init imx_keypad_probe(struct device_d *dev) keypad = xzalloc(sizeof(struct imx_keypad)); - keypad->dev = dev; iores = dev_request_mem_resource(dev, 0); if (IS_ERR(iores)) return PTR_ERR(iores); @@ -414,6 +404,7 @@ static int __init imx_keypad_probe(struct device_d *dev) if (ret) return ret; + keypad->input.parent = dev; ret = input_device_register(&keypad->input); if (ret) return ret; @@ -425,8 +416,9 @@ static __maybe_unused struct of_device_id imx_keypad_dt_ids[] = { { .compatible = "fsl,imx21-kpp", }, { } }; +MODULE_DEVICE_TABLE(of, imx_keypad_dt_ids); -static struct driver_d imx_keypad_driver = { +static struct driver imx_keypad_driver = { .name = "imx-kpp", .probe = imx_keypad_probe, .of_compatible = DRV_OF_COMPAT(imx_keypad_dt_ids), |