Commit 5c22dc8d authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

enc28j60: Fix indentation splats

Fix few indentation splats. No functional change intended.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f3cb67b0
...@@ -123,8 +123,7 @@ spi_read_buf(struct enc28j60_net *priv, int len, u8 *data) ...@@ -123,8 +123,7 @@ spi_read_buf(struct enc28j60_net *priv, int len, u8 *data)
/* /*
* SPI write buffer * SPI write buffer
*/ */
static int spi_write_buf(struct enc28j60_net *priv, int len, static int spi_write_buf(struct enc28j60_net *priv, int len, const u8 *data)
const u8 *data)
{ {
struct device *dev = &priv->spi->dev; struct device *dev = &priv->spi->dev;
int ret; int ret;
...@@ -145,8 +144,7 @@ static int spi_write_buf(struct enc28j60_net *priv, int len, ...@@ -145,8 +144,7 @@ static int spi_write_buf(struct enc28j60_net *priv, int len,
/* /*
* basic SPI read operation * basic SPI read operation
*/ */
static u8 spi_read_op(struct enc28j60_net *priv, u8 op, static u8 spi_read_op(struct enc28j60_net *priv, u8 op, u8 addr)
u8 addr)
{ {
struct device *dev = &priv->spi->dev; struct device *dev = &priv->spi->dev;
u8 tx_buf[2]; u8 tx_buf[2];
...@@ -173,8 +171,7 @@ static u8 spi_read_op(struct enc28j60_net *priv, u8 op, ...@@ -173,8 +171,7 @@ static u8 spi_read_op(struct enc28j60_net *priv, u8 op,
/* /*
* basic SPI write operation * basic SPI write operation
*/ */
static int spi_write_op(struct enc28j60_net *priv, u8 op, static int spi_write_op(struct enc28j60_net *priv, u8 op, u8 addr, u8 val)
u8 addr, u8 val)
{ {
struct device *dev = &priv->spi->dev; struct device *dev = &priv->spi->dev;
int ret; int ret;
...@@ -243,15 +240,13 @@ static void enc28j60_set_bank(struct enc28j60_net *priv, u8 addr) ...@@ -243,15 +240,13 @@ static void enc28j60_set_bank(struct enc28j60_net *priv, u8 addr)
/* /*
* Register bit field Set * Register bit field Set
*/ */
static void nolock_reg_bfset(struct enc28j60_net *priv, static void nolock_reg_bfset(struct enc28j60_net *priv, u8 addr, u8 mask)
u8 addr, u8 mask)
{ {
enc28j60_set_bank(priv, addr); enc28j60_set_bank(priv, addr);
spi_write_op(priv, ENC28J60_BIT_FIELD_SET, addr, mask); spi_write_op(priv, ENC28J60_BIT_FIELD_SET, addr, mask);
} }
static void locked_reg_bfset(struct enc28j60_net *priv, static void locked_reg_bfset(struct enc28j60_net *priv, u8 addr, u8 mask)
u8 addr, u8 mask)
{ {
mutex_lock(&priv->lock); mutex_lock(&priv->lock);
nolock_reg_bfset(priv, addr, mask); nolock_reg_bfset(priv, addr, mask);
...@@ -261,15 +256,13 @@ static void locked_reg_bfset(struct enc28j60_net *priv, ...@@ -261,15 +256,13 @@ static void locked_reg_bfset(struct enc28j60_net *priv,
/* /*
* Register bit field Clear * Register bit field Clear
*/ */
static void nolock_reg_bfclr(struct enc28j60_net *priv, static void nolock_reg_bfclr(struct enc28j60_net *priv, u8 addr, u8 mask)
u8 addr, u8 mask)
{ {
enc28j60_set_bank(priv, addr); enc28j60_set_bank(priv, addr);
spi_write_op(priv, ENC28J60_BIT_FIELD_CLR, addr, mask); spi_write_op(priv, ENC28J60_BIT_FIELD_CLR, addr, mask);
} }
static void locked_reg_bfclr(struct enc28j60_net *priv, static void locked_reg_bfclr(struct enc28j60_net *priv, u8 addr, u8 mask)
u8 addr, u8 mask)
{ {
mutex_lock(&priv->lock); mutex_lock(&priv->lock);
nolock_reg_bfclr(priv, addr, mask); nolock_reg_bfclr(priv, addr, mask);
...@@ -279,15 +272,13 @@ static void locked_reg_bfclr(struct enc28j60_net *priv, ...@@ -279,15 +272,13 @@ static void locked_reg_bfclr(struct enc28j60_net *priv,
/* /*
* Register byte read * Register byte read
*/ */
static int nolock_regb_read(struct enc28j60_net *priv, static int nolock_regb_read(struct enc28j60_net *priv, u8 address)
u8 address)
{ {
enc28j60_set_bank(priv, address); enc28j60_set_bank(priv, address);
return spi_read_op(priv, ENC28J60_READ_CTRL_REG, address); return spi_read_op(priv, ENC28J60_READ_CTRL_REG, address);
} }
static int locked_regb_read(struct enc28j60_net *priv, static int locked_regb_read(struct enc28j60_net *priv, u8 address)
u8 address)
{ {
int ret; int ret;
...@@ -301,8 +292,7 @@ static int locked_regb_read(struct enc28j60_net *priv, ...@@ -301,8 +292,7 @@ static int locked_regb_read(struct enc28j60_net *priv,
/* /*
* Register word read * Register word read
*/ */
static int nolock_regw_read(struct enc28j60_net *priv, static int nolock_regw_read(struct enc28j60_net *priv, u8 address)
u8 address)
{ {
int rl, rh; int rl, rh;
...@@ -313,8 +303,7 @@ static int nolock_regw_read(struct enc28j60_net *priv, ...@@ -313,8 +303,7 @@ static int nolock_regw_read(struct enc28j60_net *priv,
return (rh << 8) | rl; return (rh << 8) | rl;
} }
static int locked_regw_read(struct enc28j60_net *priv, static int locked_regw_read(struct enc28j60_net *priv, u8 address)
u8 address)
{ {
int ret; int ret;
...@@ -328,15 +317,13 @@ static int locked_regw_read(struct enc28j60_net *priv, ...@@ -328,15 +317,13 @@ static int locked_regw_read(struct enc28j60_net *priv,
/* /*
* Register byte write * Register byte write
*/ */
static void nolock_regb_write(struct enc28j60_net *priv, static void nolock_regb_write(struct enc28j60_net *priv, u8 address, u8 data)
u8 address, u8 data)
{ {
enc28j60_set_bank(priv, address); enc28j60_set_bank(priv, address);
spi_write_op(priv, ENC28J60_WRITE_CTRL_REG, address, data); spi_write_op(priv, ENC28J60_WRITE_CTRL_REG, address, data);
} }
static void locked_regb_write(struct enc28j60_net *priv, static void locked_regb_write(struct enc28j60_net *priv, u8 address, u8 data)
u8 address, u8 data)
{ {
mutex_lock(&priv->lock); mutex_lock(&priv->lock);
nolock_regb_write(priv, address, data); nolock_regb_write(priv, address, data);
...@@ -346,8 +333,7 @@ static void locked_regb_write(struct enc28j60_net *priv, ...@@ -346,8 +333,7 @@ static void locked_regb_write(struct enc28j60_net *priv,
/* /*
* Register word write * Register word write
*/ */
static void nolock_regw_write(struct enc28j60_net *priv, static void nolock_regw_write(struct enc28j60_net *priv, u8 address, u16 data)
u8 address, u16 data)
{ {
enc28j60_set_bank(priv, address); enc28j60_set_bank(priv, address);
spi_write_op(priv, ENC28J60_WRITE_CTRL_REG, address, (u8) data); spi_write_op(priv, ENC28J60_WRITE_CTRL_REG, address, (u8) data);
...@@ -355,8 +341,7 @@ static void nolock_regw_write(struct enc28j60_net *priv, ...@@ -355,8 +341,7 @@ static void nolock_regw_write(struct enc28j60_net *priv,
(u8) (data >> 8)); (u8) (data >> 8));
} }
static void locked_regw_write(struct enc28j60_net *priv, static void locked_regw_write(struct enc28j60_net *priv, u8 address, u16 data)
u8 address, u16 data)
{ {
mutex_lock(&priv->lock); mutex_lock(&priv->lock);
nolock_regw_write(priv, address, data); nolock_regw_write(priv, address, data);
...@@ -367,8 +352,8 @@ static void locked_regw_write(struct enc28j60_net *priv, ...@@ -367,8 +352,8 @@ static void locked_regw_write(struct enc28j60_net *priv,
* Buffer memory read * Buffer memory read
* Select the starting address and execute a SPI buffer read. * Select the starting address and execute a SPI buffer read.
*/ */
static void enc28j60_mem_read(struct enc28j60_net *priv, static void enc28j60_mem_read(struct enc28j60_net *priv, u16 addr, int len,
u16 addr, int len, u8 *data) u8 *data)
{ {
mutex_lock(&priv->lock); mutex_lock(&priv->lock);
nolock_regw_write(priv, ERDPTL, addr); nolock_regw_write(priv, ERDPTL, addr);
...@@ -1575,8 +1560,7 @@ static int enc28j60_probe(struct spi_device *spi) ...@@ -1575,8 +1560,7 @@ static int enc28j60_probe(struct spi_device *spi)
priv->netdev = dev; /* priv to netdev reference */ priv->netdev = dev; /* priv to netdev reference */
priv->spi = spi; /* priv to spi reference */ priv->spi = spi; /* priv to spi reference */
priv->msg_enable = netif_msg_init(debug.msg_enable, priv->msg_enable = netif_msg_init(debug.msg_enable, ENC28J60_MSG_DEFAULT);
ENC28J60_MSG_DEFAULT);
mutex_init(&priv->lock); mutex_init(&priv->lock);
INIT_WORK(&priv->tx_work, enc28j60_tx_work_handler); INIT_WORK(&priv->tx_work, enc28j60_tx_work_handler);
INIT_WORK(&priv->setrx_work, enc28j60_setrx_work_handler); INIT_WORK(&priv->setrx_work, enc28j60_setrx_work_handler);
......
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