aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-05-21 22:46:45 -0400
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-06-11 06:30:22 -0400
commitb4bd07e3b13e3c848c7678c4fc870cca1d22ed4e (patch)
tree56913e329212b41525d581443bb7329c4eaf8570 /drivers/net
parent2971a5bac8cab3cb56f19e9c494ecb3b120c5199 (diff)
wimax/i2400m: don't reset device on i2400m_dev_shutdown()
i2400m_dev_shutdown() tried to reset the device to put it in a known state before shutting down. But that turned out to be pointless. We reach this case in two paths: 1 - when the device resets, to clean up state 2 - when the driver is unloaded, for the same however, in both cases it is pointless; in (1) the device is already reset, why do it again? in (2) we can't -- the USB stack, for example, doesn't allow communicating with the device when the driver is being unbound and if the device is disconnected, the device is gone already. So just remove it. Leave the function as a placeholder for future cleanups that will be done from data allocated by the driver during device operation. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wimax/i2400m/control.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
index 89cdfe4e8d89..d8e0cdfa35d5 100644
--- a/drivers/net/wimax/i2400m/control.c
+++ b/drivers/net/wimax/i2400m/control.c
@@ -1396,16 +1396,16 @@ error:
1396 * 1396 *
1397 * @i2400m: device descriptor 1397 * @i2400m: device descriptor
1398 * 1398 *
1399 * Gracefully stops the device, moving it to the lowest power 1399 * Release resources acquired during the running of the device; in
1400 * consumption state possible. 1400 * theory, should also tell the device to go to sleep, switch off the
1401 * radio, all that, but at this point, in most cases (driver
1402 * disconnection, reset handling) we can't even talk to the device.
1401 */ 1403 */
1402void i2400m_dev_shutdown(struct i2400m *i2400m) 1404void i2400m_dev_shutdown(struct i2400m *i2400m)
1403{ 1405{
1404 int result = -ENODEV;
1405 struct device *dev = i2400m_dev(i2400m); 1406 struct device *dev = i2400m_dev(i2400m);
1406 1407
1407 d_fnstart(3, dev, "(i2400m %p)\n", i2400m); 1408 d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
1408 result = i2400m->bus_reset(i2400m, I2400M_RT_WARM); 1409 d_fnend(3, dev, "(i2400m %p) = void\n", i2400m);
1409 d_fnend(3, dev, "(i2400m %p) = void [%d]\n", i2400m, result);
1410 return; 1410 return;
1411} 1411}