Commit 2de0ea97 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: c_can: fix indention

This patch fixes the indention in the driver.

Link: https://lore.kernel.org/r/20210304154240.2747987-4-mkl@pengutronix.deSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent beb7e88a
...@@ -502,7 +502,7 @@ static int c_can_set_bittiming(struct net_device *dev) ...@@ -502,7 +502,7 @@ static int c_can_set_bittiming(struct net_device *dev)
reg_brpe = brpe & BRP_EXT_BRPE_MASK; reg_brpe = brpe & BRP_EXT_BRPE_MASK;
netdev_info(dev, netdev_info(dev,
"setting BTR=%04x BRPE=%04x\n", reg_btr, reg_brpe); "setting BTR=%04x BRPE=%04x\n", reg_btr, reg_brpe);
ctrl_save = priv->read_reg(priv, C_CAN_CTRL_REG); ctrl_save = priv->read_reg(priv, C_CAN_CTRL_REG);
ctrl_save &= ~CONTROL_INIT; ctrl_save &= ~CONTROL_INIT;
...@@ -836,7 +836,7 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota) ...@@ -836,7 +836,7 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota)
* for a maximum number of 16 objects. * for a maximum number of 16 objects.
*/ */
BUILD_BUG_ON_MSG(C_CAN_MSG_OBJ_RX_LAST > 16, BUILD_BUG_ON_MSG(C_CAN_MSG_OBJ_RX_LAST > 16,
"Implementation does not support more message objects than 16"); "Implementation does not support more message objects than 16");
while (quota > 0) { while (quota > 0) {
if (!pend) { if (!pend) {
...@@ -865,7 +865,7 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota) ...@@ -865,7 +865,7 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota)
} }
static int c_can_handle_state_change(struct net_device *dev, static int c_can_handle_state_change(struct net_device *dev,
enum c_can_bus_error_types error_type) enum c_can_bus_error_types error_type)
{ {
unsigned int reg_err_counter; unsigned int reg_err_counter;
unsigned int rx_err_passive; unsigned int rx_err_passive;
...@@ -1127,7 +1127,7 @@ static int c_can_open(struct net_device *dev) ...@@ -1127,7 +1127,7 @@ static int c_can_open(struct net_device *dev)
/* register interrupt handler */ /* register interrupt handler */
err = request_irq(dev->irq, &c_can_isr, IRQF_SHARED, dev->name, err = request_irq(dev->irq, &c_can_isr, IRQF_SHARED, dev->name,
dev); dev);
if (err < 0) { if (err < 0) {
netdev_err(dev, "failed to request interrupt\n"); netdev_err(dev, "failed to request interrupt\n");
goto exit_irq_fail; goto exit_irq_fail;
...@@ -1219,7 +1219,7 @@ int c_can_power_down(struct net_device *dev) ...@@ -1219,7 +1219,7 @@ int c_can_power_down(struct net_device *dev)
/* Wait for the PDA bit to get set */ /* Wait for the PDA bit to get set */
time_out = jiffies + msecs_to_jiffies(INIT_WAIT_MS); time_out = jiffies + msecs_to_jiffies(INIT_WAIT_MS);
while (!(priv->read_reg(priv, C_CAN_STS_REG) & STATUS_PDA) && while (!(priv->read_reg(priv, C_CAN_STS_REG) & STATUS_PDA) &&
time_after(time_out, jiffies)) time_after(time_out, jiffies))
cpu_relax(); cpu_relax();
if (time_after(jiffies, time_out)) if (time_after(jiffies, time_out))
...@@ -1260,7 +1260,7 @@ int c_can_power_up(struct net_device *dev) ...@@ -1260,7 +1260,7 @@ int c_can_power_up(struct net_device *dev)
/* Wait for the PDA bit to get clear */ /* Wait for the PDA bit to get clear */
time_out = jiffies + msecs_to_jiffies(INIT_WAIT_MS); time_out = jiffies + msecs_to_jiffies(INIT_WAIT_MS);
while ((priv->read_reg(priv, C_CAN_STS_REG) & STATUS_PDA) && while ((priv->read_reg(priv, C_CAN_STS_REG) & STATUS_PDA) &&
time_after(time_out, jiffies)) time_after(time_out, jiffies))
cpu_relax(); cpu_relax();
if (time_after(jiffies, time_out)) { if (time_after(jiffies, time_out)) {
......
...@@ -201,16 +201,16 @@ struct c_can_priv { ...@@ -201,16 +201,16 @@ struct c_can_priv {
atomic_t sie_pending; atomic_t sie_pending;
unsigned long tx_dir; unsigned long tx_dir;
int last_status; int last_status;
u16 (*read_reg) (const struct c_can_priv *priv, enum reg index); u16 (*read_reg)(const struct c_can_priv *priv, enum reg index);
void (*write_reg) (const struct c_can_priv *priv, enum reg index, u16 val); void (*write_reg)(const struct c_can_priv *priv, enum reg index, u16 val);
u32 (*read_reg32) (const struct c_can_priv *priv, enum reg index); u32 (*read_reg32)(const struct c_can_priv *priv, enum reg index);
void (*write_reg32) (const struct c_can_priv *priv, enum reg index, u32 val); void (*write_reg32)(const struct c_can_priv *priv, enum reg index, u32 val);
void __iomem *base; void __iomem *base;
const u16 *regs; const u16 *regs;
void *priv; /* for board-specific data */ void *priv; /* for board-specific data */
enum c_can_dev_id type; enum c_can_dev_id type;
struct c_can_raminit raminit_sys; /* RAMINIT via syscon regmap */ struct c_can_raminit raminit_sys; /* RAMINIT via syscon regmap */
void (*raminit) (const struct c_can_priv *priv, bool enable); void (*raminit)(const struct c_can_priv *priv, bool enable);
u32 comm_rcv_high; u32 comm_rcv_high;
u32 rxmasked; u32 rxmasked;
u32 dlc[C_CAN_MSG_OBJ_TX_NUM]; u32 dlc[C_CAN_MSG_OBJ_TX_NUM];
......
...@@ -47,25 +47,25 @@ struct c_can_pci_data { ...@@ -47,25 +47,25 @@ struct c_can_pci_data {
* Handle the same by providing a common read/write interface. * Handle the same by providing a common read/write interface.
*/ */
static u16 c_can_pci_read_reg_aligned_to_16bit(const struct c_can_priv *priv, static u16 c_can_pci_read_reg_aligned_to_16bit(const struct c_can_priv *priv,
enum reg index) enum reg index)
{ {
return readw(priv->base + priv->regs[index]); return readw(priv->base + priv->regs[index]);
} }
static void c_can_pci_write_reg_aligned_to_16bit(const struct c_can_priv *priv, static void c_can_pci_write_reg_aligned_to_16bit(const struct c_can_priv *priv,
enum reg index, u16 val) enum reg index, u16 val)
{ {
writew(val, priv->base + priv->regs[index]); writew(val, priv->base + priv->regs[index]);
} }
static u16 c_can_pci_read_reg_aligned_to_32bit(const struct c_can_priv *priv, static u16 c_can_pci_read_reg_aligned_to_32bit(const struct c_can_priv *priv,
enum reg index) enum reg index)
{ {
return readw(priv->base + 2 * priv->regs[index]); return readw(priv->base + 2 * priv->regs[index]);
} }
static void c_can_pci_write_reg_aligned_to_32bit(const struct c_can_priv *priv, static void c_can_pci_write_reg_aligned_to_32bit(const struct c_can_priv *priv,
enum reg index, u16 val) enum reg index, u16 val)
{ {
writew(val, priv->base + 2 * priv->regs[index]); writew(val, priv->base + 2 * priv->regs[index]);
} }
...@@ -87,13 +87,13 @@ static u32 c_can_pci_read_reg32(const struct c_can_priv *priv, enum reg index) ...@@ -87,13 +87,13 @@ static u32 c_can_pci_read_reg32(const struct c_can_priv *priv, enum reg index)
u32 val; u32 val;
val = priv->read_reg(priv, index); val = priv->read_reg(priv, index);
val |= ((u32) priv->read_reg(priv, index + 1)) << 16; val |= ((u32)priv->read_reg(priv, index + 1)) << 16;
return val; return val;
} }
static void c_can_pci_write_reg32(const struct c_can_priv *priv, enum reg index, static void c_can_pci_write_reg32(const struct c_can_priv *priv, enum reg index,
u32 val) u32 val)
{ {
priv->write_reg(priv, index + 1, val >> 16); priv->write_reg(priv, index + 1, val >> 16);
priv->write_reg(priv, index, val); priv->write_reg(priv, index, val);
...@@ -216,7 +216,7 @@ static int c_can_pci_probe(struct pci_dev *pdev, ...@@ -216,7 +216,7 @@ static int c_can_pci_probe(struct pci_dev *pdev,
} }
dev_dbg(&pdev->dev, "%s device registered (regs=%p, irq=%d)\n", dev_dbg(&pdev->dev, "%s device registered (regs=%p, irq=%d)\n",
KBUILD_MODNAME, priv->regs, dev->irq); KBUILD_MODNAME, priv->regs, dev->irq);
return 0; return 0;
...@@ -251,7 +251,7 @@ static void c_can_pci_remove(struct pci_dev *pdev) ...@@ -251,7 +251,7 @@ static void c_can_pci_remove(struct pci_dev *pdev)
pci_disable_device(pdev); pci_disable_device(pdev);
} }
static const struct c_can_pci_data c_can_sta2x11= { static const struct c_can_pci_data c_can_sta2x11 = {
.type = BOSCH_C_CAN, .type = BOSCH_C_CAN,
.reg_align = C_CAN_REG_ALIGN_32, .reg_align = C_CAN_REG_ALIGN_32,
.freq = 52000000, /* 52 Mhz */ .freq = 52000000, /* 52 Mhz */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment