|
@@ -442,12 +442,6 @@ static int imx_keypad_probe(struct platform_device *pdev)
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
|
- if (res == NULL) {
|
|
|
- dev_err(&pdev->dev, "no I/O memory defined in platform data\n");
|
|
|
- return -EINVAL;
|
|
|
- }
|
|
|
-
|
|
|
input_dev = devm_input_allocate_device(&pdev->dev);
|
|
|
if (!input_dev) {
|
|
|
dev_err(&pdev->dev, "failed to allocate the input device\n");
|
|
@@ -468,6 +462,7 @@ static int imx_keypad_probe(struct platform_device *pdev)
|
|
|
setup_timer(&keypad->check_matrix_timer,
|
|
|
imx_keypad_check_for_events, (unsigned long) keypad);
|
|
|
|
|
|
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
|
keypad->mmio_base = devm_ioremap_resource(&pdev->dev, res);
|
|
|
if (IS_ERR(keypad->mmio_base))
|
|
|
return PTR_ERR(keypad->mmio_base);
|