Skip to content

Commit

Permalink
can: c_can_platform: add MODULE_DEVICE_TABLE
Browse files Browse the repository at this point in the history
This patch adds a MODULE_DEVICE_TABLE for the of and platform bindings, so that
the module can be loaded automatically by udev.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
Marc Kleine-Budde committed Nov 27, 2012
1 parent 09ca71c commit 69c0c5b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/can/c_can/c_can_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ static struct platform_device_id c_can_id_table[] = {
}, {
}
};
MODULE_DEVICE_TABLE(platform, c_can_id_table);

static const struct of_device_id c_can_of_table[] = {
{ .compatible = "bosch,c_can", .data = &c_can_id_table[BOSCH_C_CAN] },
{ .compatible = "bosch,d_can", .data = &c_can_id_table[BOSCH_D_CAN] },
{ /* sentinel */ },
};
MODULE_DEVICE_TABLE(of, c_can_of_table);

static int __devinit c_can_plat_probe(struct platform_device *pdev)
{
Expand Down

0 comments on commit 69c0c5b

Please sign in to comment.