diff options
Diffstat (limited to 'drivers/net/sunhme.c')
-rw-r--r-- | drivers/net/sunhme.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index eb4f59fb01e9..bff2f7999ff0 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -3237,15 +3237,18 @@ static void happy_meal_pci_exit(void) | |||
3237 | #endif | 3237 | #endif |
3238 | 3238 | ||
3239 | #ifdef CONFIG_SBUS | 3239 | #ifdef CONFIG_SBUS |
3240 | static const struct of_device_id hme_sbus_match[]; | ||
3240 | static int __devinit hme_sbus_probe(struct platform_device *op) | 3241 | static int __devinit hme_sbus_probe(struct platform_device *op) |
3241 | { | 3242 | { |
3243 | const struct of_device_id *match; | ||
3242 | struct device_node *dp = op->dev.of_node; | 3244 | struct device_node *dp = op->dev.of_node; |
3243 | const char *model = of_get_property(dp, "model", NULL); | 3245 | const char *model = of_get_property(dp, "model", NULL); |
3244 | int is_qfe; | 3246 | int is_qfe; |
3245 | 3247 | ||
3246 | if (!op->dev.of_match) | 3248 | match = of_match_device(hme_sbus_match, &op->dev); |
3249 | if (!match) | ||
3247 | return -EINVAL; | 3250 | return -EINVAL; |
3248 | is_qfe = (op->dev.of_match->data != NULL); | 3251 | is_qfe = (match->data != NULL); |
3249 | 3252 | ||
3250 | if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) | 3253 | if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) |
3251 | is_qfe = 1; | 3254 | is_qfe = 1; |