aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/xilinx_hwicap/xilinx_hwicap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/xilinx_hwicap/xilinx_hwicap.c')
-rw-r--r--drivers/char/xilinx_hwicap/xilinx_hwicap.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
index d6412c16385f..39ccdeada791 100644
--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
@@ -715,13 +715,13 @@ static int __devexit hwicap_remove(struct device *dev)
715} 715}
716 716
717#ifdef CONFIG_OF 717#ifdef CONFIG_OF
718static int __devinit hwicap_of_probe(struct platform_device *op) 718static int __devinit hwicap_of_probe(struct platform_device *op,
719 const struct hwicap_driver_config *config)
719{ 720{
720 struct resource res; 721 struct resource res;
721 const unsigned int *id; 722 const unsigned int *id;
722 const char *family; 723 const char *family;
723 int rc; 724 int rc;
724 const struct hwicap_driver_config *config = op->dev.of_match->data;
725 const struct config_registers *regs; 725 const struct config_registers *regs;
726 726
727 727
@@ -751,20 +751,24 @@ static int __devinit hwicap_of_probe(struct platform_device *op)
751 regs); 751 regs);
752} 752}
753#else 753#else
754static inline int hwicap_of_probe(struct platform_device *op) 754static inline int hwicap_of_probe(struct platform_device *op,
755 const struct hwicap_driver_config *config)
755{ 756{
756 return -EINVAL; 757 return -EINVAL;
757} 758}
758#endif /* CONFIG_OF */ 759#endif /* CONFIG_OF */
759 760
761static const struct of_device_id __devinitconst hwicap_of_match[];
760static int __devinit hwicap_drv_probe(struct platform_device *pdev) 762static int __devinit hwicap_drv_probe(struct platform_device *pdev)
761{ 763{
764 const struct of_device_id *match;
762 struct resource *res; 765 struct resource *res;
763 const struct config_registers *regs; 766 const struct config_registers *regs;
764 const char *family; 767 const char *family;
765 768
766 if (pdev->dev.of_match) 769 match = of_match_device(hwicap_of_match, &pdev->dev);
767 return hwicap_of_probe(pdev); 770 if (match)
771 return hwicap_of_probe(pdev, match->data);
768 772
769 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 773 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
770 if (!res) 774 if (!res)