]> Pileus Git - ~andy/linux/commitdiff
can: flexcan: fix mx28 detection by rearanging OF match table
authorMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 3 Oct 2013 21:51:55 +0000 (23:51 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 9 Oct 2013 21:02:58 +0000 (23:02 +0200)
The current implemetation of of_match_device() relies that the of_device_id
table in the driver is sorted from most specific to least specific compatible.

Without this patch the mx28 is detected as the less specific p1010. This leads
to a p1010 specific workaround is activated on the mx28, which is not needed.

Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/flexcan.c

index f028c5d52e21b020bd72583fe1f0e44d5bab730e..8f5ce747feb57a093dc78e4a24bd9742b5ea99fc 100644 (file)
@@ -985,9 +985,9 @@ static void unregister_flexcandev(struct net_device *dev)
 }
 
 static const struct of_device_id flexcan_of_match[] = {
-       { .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
-       { .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
        { .compatible = "fsl,imx6q-flexcan", .data = &fsl_imx6q_devtype_data, },
+       { .compatible = "fsl,imx28-flexcan", .data = &fsl_imx28_devtype_data, },
+       { .compatible = "fsl,p1010-flexcan", .data = &fsl_p1010_devtype_data, },
        { /* sentinel */ },
 };
 MODULE_DEVICE_TABLE(of, flexcan_of_match);