Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

uio_pdrv_genirq: convert to use device_property APIs

Convert the uio_pdrv_genirq driver to use the device_property_* APIs
instead of the of_property_* ones. This allows UIO interrupts to be
defined via an ACPI overlay using the Device Tree namespace linkage.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20240408234050.2056374-2-chris.packham@alliedtelesis.co.nz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Chris Packham and committed by
Greg Kroah-Hartman
90fa0280 1019fa48

+5 -5
+5 -5
drivers/uio/uio_pdrv_genirq.c
··· 23 23 #include <linux/irq.h> 24 24 25 25 #include <linux/of.h> 26 - #include <linux/of_platform.h> 27 - #include <linux/of_address.h> 26 + #include <linux/mod_devicetable.h> 27 + #include <linux/property.h> 28 28 29 29 #define DRIVER_NAME "uio_pdrv_genirq" 30 30 ··· 110 110 static int uio_pdrv_genirq_probe(struct platform_device *pdev) 111 111 { 112 112 struct uio_info *uioinfo = dev_get_platdata(&pdev->dev); 113 - struct device_node *node = pdev->dev.of_node; 113 + struct fwnode_handle *node = dev_fwnode(&pdev->dev); 114 114 struct uio_pdrv_genirq_platdata *priv; 115 115 struct uio_mem *uiomem; 116 116 int ret = -EINVAL; ··· 127 127 return -ENOMEM; 128 128 } 129 129 130 - if (!of_property_read_string(node, "linux,uio-name", &name)) 130 + if (!device_property_read_string(&pdev->dev, "linux,uio-name", &name)) 131 131 uioinfo->name = devm_kstrdup(&pdev->dev, name, GFP_KERNEL); 132 132 else 133 133 uioinfo->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, 134 - "%pOFn", node); 134 + "%pfwP", node); 135 135 136 136 uioinfo->version = "devicetree"; 137 137 /* Multiple IRQs are not supported */