Skip to content

Commit

Permalink
drivers/net: Use of_match_ptr() macro in smsc911x.c
Browse files Browse the repository at this point in the history
Add CONFIG_OF guard and use of_match_ptr macro.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sachin Kamat authored and David S. Miller committed Dec 19, 2012
1 parent 89ce376 commit d62fdf8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/smsc/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2575,11 +2575,13 @@ static const struct dev_pm_ops smsc911x_pm_ops = {
#define SMSC911X_PM_OPS NULL
#endif

#ifdef CONFIG_OF
static const struct of_device_id smsc911x_dt_ids[] = {
{ .compatible = "smsc,lan9115", },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, smsc911x_dt_ids);
#endif

static struct platform_driver smsc911x_driver = {
.probe = smsc911x_drv_probe,
Expand All @@ -2588,7 +2590,7 @@ static struct platform_driver smsc911x_driver = {
.name = SMSC_CHIPNAME,
.owner = THIS_MODULE,
.pm = SMSC911X_PM_OPS,
.of_match_table = smsc911x_dt_ids,
.of_match_table = of_match_ptr(smsc911x_dt_ids),
},
};

Expand Down

0 comments on commit d62fdf8

Please sign in to comment.