--- zzzz-none-000/linux-3.10.107/drivers/input/serio/xilinx_ps2.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/input/serio/xilinx_ps2.c 2021-02-04 17:41:59.000000000 +0000 @@ -20,11 +20,11 @@ #include #include #include -#include #include #include #include #include +#include #include #define DRIVER_NAME "xilinx_ps2" @@ -235,12 +235,12 @@ */ static int xps2_of_probe(struct platform_device *ofdev) { - struct resource r_irq; /* Interrupt resources */ struct resource r_mem; /* IO mem resources */ struct xps2data *drvdata; struct serio *serio; struct device *dev = &ofdev->dev; resource_size_t remap_size, phys_addr; + unsigned int irq; int error; dev_info(dev, "Device Tree Probing \'%s\'\n", @@ -254,7 +254,8 @@ } /* Get IRQ for the device */ - if (!of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq)) { + irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); + if (!irq) { dev_err(dev, "no IRQ found\n"); return -ENODEV; } @@ -267,7 +268,7 @@ } spin_lock_init(&drvdata->lock); - drvdata->irq = r_irq.start; + drvdata->irq = irq; drvdata->serio = serio; drvdata->dev = dev; @@ -349,8 +350,6 @@ kfree(drvdata); - platform_set_drvdata(of_dev, NULL); - return 0; } @@ -364,7 +363,6 @@ static struct platform_driver xps2_of_driver = { .driver = { .name = DRIVER_NAME, - .owner = THIS_MODULE, .of_match_table = xps2_of_match, }, .probe = xps2_of_probe,