diff options
author | Wolfgang Grandegger <wg@grandegger.com> | 2010-05-18 01:39:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-18 01:39:48 -0400 |
commit | 56e6943b902562e09d3e74126d8d8256b5ea17fb (patch) | |
tree | 3b37d2e1382a666152b7c655a67b4f7b785c142f /drivers/net/can | |
parent | d19d56ddc88e7895429ef118db9c83c7bbe3ce6a (diff) |
can: sja1000 platform data fixes
The member "clock" of struct "sja1000_platform_data" is documented as
"CAN bus oscillator frequency in Hz" but it's actually used as the CAN
clock frequency, which is half of it. To avoid further confusion, this
patch fixes it by renaming the member to "osc_freq". That way, also
non mainline users will notice the change. The platform code for the
relevant boards is updated accordingly. Furthermore, pre-defined
values are now used for the members "ocr" and "cdr".
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/sja1000/sja1000_platform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/can/sja1000/sja1000_platform.c b/drivers/net/can/sja1000/sja1000_platform.c index b65cabb361ab..d9fadc489b32 100644 --- a/drivers/net/can/sja1000/sja1000_platform.c +++ b/drivers/net/can/sja1000/sja1000_platform.c | |||
@@ -111,7 +111,8 @@ static int sp_probe(struct platform_device *pdev) | |||
111 | dev->irq = res_irq->start; | 111 | dev->irq = res_irq->start; |
112 | priv->irq_flags = res_irq->flags & (IRQF_TRIGGER_MASK | IRQF_SHARED); | 112 | priv->irq_flags = res_irq->flags & (IRQF_TRIGGER_MASK | IRQF_SHARED); |
113 | priv->reg_base = addr; | 113 | priv->reg_base = addr; |
114 | priv->can.clock.freq = pdata->clock; | 114 | /* The CAN clock frequency is half the oscillator clock frequency */ |
115 | priv->can.clock.freq = pdata->osc_freq / 2; | ||
115 | priv->ocr = pdata->ocr; | 116 | priv->ocr = pdata->ocr; |
116 | priv->cdr = pdata->cdr; | 117 | priv->cdr = pdata->cdr; |
117 | 118 | ||