Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171240
b: refs/heads/master
c: a8ee303
h: refs/heads/master
v: v3
  • Loading branch information
Inaky Perez-Gonzalez committed Oct 19, 2009
1 parent 7caf5e4 commit 3f81a40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 097acbeff98178e01c2f6adb2259ab4d811340cc
refs/heads/master: a8ee303cae6fbdaa639afa50b9d03ce6f0c7d7da
43 changes: 9 additions & 34 deletions trunk/drivers/net/wimax/i2400m/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,6 @@
* i2400ms_bus_reset() Called by i2400m->bus_reset
* __i2400ms_reset()
* __i2400ms_send_barker()
*
* i2400ms_bus_dev_start() Called by i2400m_dev_start() [who is
* i2400ms_tx_setup() called by i2400m_setup()]
* i2400ms_rx_setup()
*
* i2400ms_bus_dev_stop() Called by i2400m_dev_stop() [who is
* i2400ms_rx_release() is called by i2400m_release()]
* i2400ms_tx_release()
*
*/

#include <linux/debugfs.h>
Expand Down Expand Up @@ -191,12 +182,17 @@ int i2400ms_bus_setup(struct i2400m *i2400m)
goto error_func_enable;
}

result = i2400ms_tx_setup(i2400ms);
if (result < 0)
goto error_tx_setup;
result = i2400ms_rx_setup(i2400ms);
if (result < 0)
goto error_rx_setup;
return 0;

error_rx_setup:
i2400ms_tx_release(i2400ms);
error_tx_setup:
sdio_claim_host(func);
sdio_disable_func(func);
sdio_release_host(func);
Expand All @@ -218,6 +214,7 @@ void i2400ms_bus_release(struct i2400m *i2400m)
struct sdio_func *func = i2400ms->func;

i2400ms_rx_release(i2400ms);
i2400ms_tx_release(i2400ms);
sdio_claim_host(func);
sdio_disable_func(func);
sdio_release_host(func);
Expand All @@ -235,36 +232,14 @@ void i2400ms_bus_release(struct i2400m *i2400m)
static
int i2400ms_bus_dev_start(struct i2400m *i2400m)
{
int result;
struct i2400ms *i2400ms = container_of(i2400m, struct i2400ms, i2400m);
struct sdio_func *func = i2400ms->func;
struct device *dev = &func->dev;

d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
msleep(200);
result = i2400ms_tx_setup(i2400ms);
if (result < 0)
goto error_tx_setup;
d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result);
return result;

error_tx_setup:
i2400ms_tx_release(i2400ms);
d_fnend(3, dev, "(i2400m %p) = void\n", i2400m);
return result;
}


static
void i2400ms_bus_dev_stop(struct i2400m *i2400m)
{
struct i2400ms *i2400ms = container_of(i2400m, struct i2400ms, i2400m);
struct sdio_func *func = i2400ms->func;
struct device *dev = &func->dev;

d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
i2400ms_tx_release(i2400ms);
d_fnend(3, dev, "(i2400m %p) = void\n", i2400m);
d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, 0);
return 0;
}


Expand Down Expand Up @@ -506,7 +481,7 @@ int i2400ms_probe(struct sdio_func *func,
i2400m->bus_pl_size_max = I2400MS_PL_SIZE_MAX;
i2400m->bus_setup = i2400ms_bus_setup;
i2400m->bus_dev_start = i2400ms_bus_dev_start;
i2400m->bus_dev_stop = i2400ms_bus_dev_stop;
i2400m->bus_dev_stop = NULL;
i2400m->bus_release = i2400ms_bus_release;
i2400m->bus_tx_kick = i2400ms_bus_tx_kick;
i2400m->bus_reset = i2400ms_bus_reset;
Expand Down

0 comments on commit 3f81a40

Please sign in to comment.