can: sja1000: fix define conflict on SH
Thias patch fixes a define conflict between the SH architecture and the sja1000 driver: drivers/net/can/sja1000/sja1000.h:59:0: warning: "REG_SR" redefined [enabled by default] arch/sh/include/asm/ptrace_32.h:25:0: note: this is the location of the previous definition A SJA1000_ prefix is added to the offending sja1000 define only, to make a minimal patch suited for stable. A later patch will add a SJA1000_ prefix to all defines in sja1000.h. Cc: linux-stable <stable@vger.kernel.org> Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
@@ -348,7 +348,7 @@ static inline int plx_pci_check_sja1000(const struct sja1000_priv *priv)
|
||||
*/
|
||||
if ((priv->read_reg(priv, REG_CR) & REG_CR_BASICCAN_INITIAL_MASK) ==
|
||||
REG_CR_BASICCAN_INITIAL &&
|
||||
(priv->read_reg(priv, REG_SR) == REG_SR_BASICCAN_INITIAL) &&
|
||||
(priv->read_reg(priv, SJA1000_REG_SR) == REG_SR_BASICCAN_INITIAL) &&
|
||||
(priv->read_reg(priv, REG_IR) == REG_IR_BASICCAN_INITIAL))
|
||||
flag = 1;
|
||||
|
||||
@@ -360,7 +360,7 @@ static inline int plx_pci_check_sja1000(const struct sja1000_priv *priv)
|
||||
* See states on p. 23 of the Datasheet.
|
||||
*/
|
||||
if (priv->read_reg(priv, REG_MOD) == REG_MOD_PELICAN_INITIAL &&
|
||||
priv->read_reg(priv, REG_SR) == REG_SR_PELICAN_INITIAL &&
|
||||
priv->read_reg(priv, SJA1000_REG_SR) == REG_SR_PELICAN_INITIAL &&
|
||||
priv->read_reg(priv, REG_IR) == REG_IR_PELICAN_INITIAL)
|
||||
return flag;
|
||||
|
||||
|
Reference in New Issue
Block a user