aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/xilinx_spi_of.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/xilinx_spi_of.c')
-rw-r--r--drivers/spi/xilinx_spi_of.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/spi/xilinx_spi_of.c b/drivers/spi/xilinx_spi_of.c
index 748d33a76d2..4654805b08d 100644
--- a/drivers/spi/xilinx_spi_of.c
+++ b/drivers/spi/xilinx_spi_of.c
@@ -48,13 +48,13 @@ static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
48 const u32 *prop; 48 const u32 *prop;
49 int len; 49 int len;
50 50
51 rc = of_address_to_resource(ofdev->node, 0, &r_mem); 51 rc = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem);
52 if (rc) { 52 if (rc) {
53 dev_warn(&ofdev->dev, "invalid address\n"); 53 dev_warn(&ofdev->dev, "invalid address\n");
54 return rc; 54 return rc;
55 } 55 }
56 56
57 rc = of_irq_to_resource(ofdev->node, 0, &r_irq); 57 rc = of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq);
58 if (rc == NO_IRQ) { 58 if (rc == NO_IRQ) {
59 dev_warn(&ofdev->dev, "no IRQ found\n"); 59 dev_warn(&ofdev->dev, "no IRQ found\n");
60 return -ENODEV; 60 return -ENODEV;
@@ -67,7 +67,7 @@ static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
67 return -ENOMEM; 67 return -ENOMEM;
68 68
69 /* number of slave select bits is required */ 69 /* 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);
71 if (!prop || len < sizeof(*prop)) { 71 if (!prop || len < sizeof(*prop)) {
72 dev_warn(&ofdev->dev, "no 'xlnx,num-ss-bits' property\n"); 72 dev_warn(&ofdev->dev, "no 'xlnx,num-ss-bits' property\n");
73 return -EINVAL; 73 return -EINVAL;
@@ -81,7 +81,7 @@ static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
81 dev_set_drvdata(&ofdev->dev, master); 81 dev_set_drvdata(&ofdev->dev, master);
82 82
83 /* Add any subnodes on the SPI bus */ 83 /* 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);
85 85
86 return 0; 86 return 0;
87} 87}
@@ -109,12 +109,12 @@ static const struct of_device_id xilinx_spi_of_match[] = {
109MODULE_DEVICE_TABLE(of, xilinx_spi_of_match); 109MODULE_DEVICE_TABLE(of, xilinx_spi_of_match);
110 110
111static struct of_platform_driver xilinx_spi_of_driver = { 111static struct of_platform_driver xilinx_spi_of_driver = {
112 .match_table = xilinx_spi_of_match,
113 .probe = xilinx_spi_of_probe, 112 .probe = xilinx_spi_of_probe,
114 .remove = __exit_p(xilinx_spi_of_remove), 113 .remove = __exit_p(xilinx_spi_of_remove),
115 .driver = { 114 .driver = {
116 .name = "xilinx-xps-spi", 115 .name = "xilinx-xps-spi",
117 .owner = THIS_MODULE, 116 .owner = THIS_MODULE,
117 .of_match_table = xilinx_spi_of_match,
118 }, 118 },
119}; 119};
120 120