Skip to content

Commit bf6a67e

Browse files
committed
spi/xilinx: Fix compile error
Commit 58f9b0b, "of: eliminate of_device->node and dev_archdata->{of,prom}_node" changed the location of the device_node pointer. Most drivers were converted to the new location, but the xilinx_spi_of driver was missed and now fails to compile. This patch fixes up the xilinx_spi_of driver to use the new location. Signed-off-by: Grant Likely <[email protected]>
1 parent b1e50eb commit bf6a67e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/spi/xilinx_spi_of.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
4848
const u32 *prop;
4949
int len;
5050

51-
rc = of_address_to_resource(ofdev->node, 0, &r_mem);
51+
rc = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem);
5252
if (rc) {
5353
dev_warn(&ofdev->dev, "invalid address\n");
5454
return rc;
5555
}
5656

57-
rc = of_irq_to_resource(ofdev->node, 0, &r_irq);
57+
rc = of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq);
5858
if (rc == NO_IRQ) {
5959
dev_warn(&ofdev->dev, "no IRQ found\n");
6060
return -ENODEV;
@@ -67,7 +67,7 @@ static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
6767
return -ENOMEM;
6868

6969
/* number of slave select bits is required */
70-
prop = of_get_property(ofdev->node, "xlnx,num-ss-bits", &len);
70+
prop = of_get_property(ofdev->dev.of_node, "xlnx,num-ss-bits", &len);
7171
if (!prop || len < sizeof(*prop)) {
7272
dev_warn(&ofdev->dev, "no 'xlnx,num-ss-bits' property\n");
7373
return -EINVAL;
@@ -81,7 +81,7 @@ static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
8181
dev_set_drvdata(&ofdev->dev, master);
8282

8383
/* Add any subnodes on the SPI bus */
84-
of_register_spi_devices(master, ofdev->node);
84+
of_register_spi_devices(master, ofdev->dev.of_node);
8585

8686
return 0;
8787
}

0 commit comments

Comments
 (0)