From 7caf5e4c51a93efff17b0041a40ef24e11af474d Mon Sep 17 00:00:00 2001 From: Inaky Perez-Gonzalez Date: Thu, 8 Oct 2009 12:33:50 +0900 Subject: [PATCH] --- yaml --- r: 171239 b: refs/heads/master c: 097acbeff98178e01c2f6adb2259ab4d811340cc h: refs/heads/master i: 171237: a75615c41e4d1fe22c2c74ccc4c550f1eedf14ba 171235: fd3d48d032f2d84fd079d679a851d363db9c29c6 171231: 8b7418b6183b93c0278136b7234ac3975d890434 v: v3 --- [refs] | 2 +- trunk/drivers/net/wimax/i2400m/driver.c | 14 +++++++++----- trunk/drivers/net/wimax/i2400m/i2400m.h | 14 +++++++------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 8f230508a256..efdcf2b947d2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4a78fd9a736db4c871bc8b583d66b61c38abd299 +refs/heads/master: 097acbeff98178e01c2f6adb2259ab4d811340cc diff --git a/trunk/drivers/net/wimax/i2400m/driver.c b/trunk/drivers/net/wimax/i2400m/driver.c index cc900b99e60a..cc58a864bd06 100644 --- a/trunk/drivers/net/wimax/i2400m/driver.c +++ b/trunk/drivers/net/wimax/i2400m/driver.c @@ -384,9 +384,11 @@ int __i2400m_dev_start(struct i2400m *i2400m, enum i2400m_bri flags) dev_err(dev, "cannot create workqueue\n"); goto error_create_workqueue; } - result = i2400m->bus_dev_start(i2400m); - if (result < 0) - goto error_bus_dev_start; + if (i2400m->bus_dev_start) { + result = i2400m->bus_dev_start(i2400m); + if (result < 0) + goto error_bus_dev_start; + } i2400m->ready = 1; wmb(); /* see i2400m->ready's documentation */ /* process pending reports from the device */ @@ -413,7 +415,8 @@ int __i2400m_dev_start(struct i2400m *i2400m, enum i2400m_bri flags) wmb(); /* see i2400m->ready's documentation */ flush_workqueue(i2400m->work_queue); error_fw_check: - i2400m->bus_dev_stop(i2400m); + if (i2400m->bus_dev_stop) + i2400m->bus_dev_stop(i2400m); error_bus_dev_start: destroy_workqueue(i2400m->work_queue); error_create_workqueue: @@ -480,7 +483,8 @@ void __i2400m_dev_stop(struct i2400m *i2400m) wmb(); /* see i2400m->ready's documentation */ flush_workqueue(i2400m->work_queue); - i2400m->bus_dev_stop(i2400m); + if (i2400m->bus_dev_stop) + i2400m->bus_dev_stop(i2400m); destroy_workqueue(i2400m->work_queue); i2400m_rx_release(i2400m); i2400m_tx_release(i2400m); diff --git a/trunk/drivers/net/wimax/i2400m/i2400m.h b/trunk/drivers/net/wimax/i2400m/i2400m.h index 55bca430c69b..5eee985f2926 100644 --- a/trunk/drivers/net/wimax/i2400m/i2400m.h +++ b/trunk/drivers/net/wimax/i2400m/i2400m.h @@ -245,19 +245,19 @@ struct i2400m_barker_db; * all the host resources created to handle communication with * the device. * - * @bus_dev_start: [fill] Function called by the bus-generic code - * [i2400m_dev_start()] to setup the bus-specific communications - * to the the device. See LIFE CYCLE above. + * @bus_dev_start: [optional fill] Function called by the bus-generic + * code [i2400m_dev_start()] to do things needed to start the + * device. See LIFE CYCLE above. * * NOTE: Doesn't need to upload the firmware, as that is taken * care of by the bus-generic code. * - * @bus_dev_stop: [fill] Function called by the bus-generic code - * [i2400m_dev_stop()] to shutdown the bus-specific communications - * to the the device. See LIFE CYCLE above. + * @bus_dev_stop: [optional fill] Function called by the bus-generic + * code [i2400m_dev_stop()] to do things needed for stopping the + * device. See LIFE CYCLE above. * * This function does not need to reset the device, just tear down - * all the host resources created to handle communication with + * all the host resources created to handle communication with * the device. * * @bus_tx_kick: [fill] Function called by the bus-generic code to let