summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorWilliam Lai <b04597@freescale.com>2010-01-25 15:32:26 +0800
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-24 11:50:04 +0200
commitab8c5a1a9a0d7c42e063762700f497a57300a93b (patch)
treeb4cdddf361054c73fb03f4262dcbc125ed048f62 /drivers/net
parentd7f01c4be1211df6aa8843df91600131d231f05f (diff)
ENGR00120372 CAN: Clock source for FlexCAN module can not be changed
Change the function strcasecmp(buf, "osc") to strncasecmp(buf, "osc", 3), which only compare the first 3bytes. Signed-off-by: William Lai <b04597@freescale.com> Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/flexcan/dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/can/flexcan/dev.c b/drivers/net/can/flexcan/dev.c
index f8386e5effa9..cc117f0fca9b 100644
--- a/drivers/net/can/flexcan/dev.c
+++ b/drivers/net/can/flexcan/dev.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -338,9 +338,9 @@ static ssize_t flexcan_set_attr(struct device *dev,
goto set_finish;
if (attr_id == FLEXCAN_ATTR_BR_CLKSRC) {
- if (!strcasecmp(buf, "bus"))
+ if (!strncasecmp(buf, "bus", 3))
flexcan->br_clksrc = 1;
- else if (!strcasecmp(buf, "osc"))
+ else if (!strncasecmp(buf, "osc", 3))
flexcan->br_clksrc = 0;
goto set_finish;
}