diff options
Diffstat (limited to 'drivers/char/hw_random/n2-drv.c')
-rw-r--r-- | drivers/char/hw_random/n2-drv.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index 43ac61978d8b..ac6739e085e3 100644 --- a/drivers/char/hw_random/n2-drv.c +++ b/drivers/char/hw_random/n2-drv.c | |||
@@ -619,15 +619,18 @@ static void __devinit n2rng_driver_version(void) | |||
619 | pr_info("%s", version); | 619 | pr_info("%s", version); |
620 | } | 620 | } |
621 | 621 | ||
622 | static const struct of_device_id n2rng_match[]; | ||
622 | static int __devinit n2rng_probe(struct platform_device *op) | 623 | static int __devinit n2rng_probe(struct platform_device *op) |
623 | { | 624 | { |
625 | const struct of_device_id *match; | ||
624 | int victoria_falls; | 626 | int victoria_falls; |
625 | int err = -ENOMEM; | 627 | int err = -ENOMEM; |
626 | struct n2rng *np; | 628 | struct n2rng *np; |
627 | 629 | ||
628 | if (!op->dev.of_match) | 630 | match = of_match_device(n2rng_match, &op->dev); |
631 | if (!match) | ||
629 | return -EINVAL; | 632 | return -EINVAL; |
630 | victoria_falls = (op->dev.of_match->data != NULL); | 633 | victoria_falls = (match->data != NULL); |
631 | 634 | ||
632 | n2rng_driver_version(); | 635 | n2rng_driver_version(); |
633 | np = kzalloc(sizeof(*np), GFP_KERNEL); | 636 | np = kzalloc(sizeof(*np), GFP_KERNEL); |