Skip to content

Commit

Permalink
can: at91_can: register mb0 sysfs entry only on at91sam9263
Browse files Browse the repository at this point in the history
This patch prepares the driver for the at91sam9X5 processors,
which don't have the mb0 bug.
(See commit 3a5655a for more details.)

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Marc Kleine-Budde committed Jun 6, 2011
1 parent d3d4726 commit 07a648e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,6 @@ static int __devinit at91_can_probe(struct platform_device *pdev)
dev->netdev_ops = &at91_netdev_ops;
dev->irq = irq;
dev->flags |= IFF_ECHO;
dev->sysfs_groups[0] = &at91_sysfs_attr_group;

priv = netdev_priv(dev);
priv->can.clock.freq = clk_get_rate(clk);
Expand All @@ -1275,6 +1274,9 @@ static int __devinit at91_can_probe(struct platform_device *pdev)

netif_napi_add(dev, &priv->napi, at91_poll, get_mb_rx_num(priv));

if (at91_is_sam9263(priv))
dev->sysfs_groups[0] = &at91_sysfs_attr_group;

dev_set_drvdata(&pdev->dev, dev);
SET_NETDEV_DEV(dev, &pdev->dev);

Expand Down

0 comments on commit 07a648e

Please sign in to comment.