提交 44976c66 编写于 作者: U Ulrich Kunitz 提交者: John W. Linville

[PATCH] zd1211rw: Removes wrong assertions

Checking whether a mutex is not locked directly before
mutex_lock() is called, doesn't make sense. The whole point of
mutex_lock() is to block, if the mutex is locked.
Signed-off-by: NUlrich Kunitz <kune@deine-taler.de>
Signed-off-by: NDaniel Drake <dsd@gentoo.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 cbb5e6bb
...@@ -249,7 +249,6 @@ int zd_ioread16(struct zd_chip *chip, zd_addr_t addr, u16 *value) ...@@ -249,7 +249,6 @@ int zd_ioread16(struct zd_chip *chip, zd_addr_t addr, u16 *value)
{ {
int r; int r;
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
mutex_lock(&chip->mutex); mutex_lock(&chip->mutex);
r = zd_ioread16_locked(chip, value, addr); r = zd_ioread16_locked(chip, value, addr);
mutex_unlock(&chip->mutex); mutex_unlock(&chip->mutex);
...@@ -260,7 +259,6 @@ int zd_ioread32(struct zd_chip *chip, zd_addr_t addr, u32 *value) ...@@ -260,7 +259,6 @@ int zd_ioread32(struct zd_chip *chip, zd_addr_t addr, u32 *value)
{ {
int r; int r;
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
mutex_lock(&chip->mutex); mutex_lock(&chip->mutex);
r = zd_ioread32_locked(chip, value, addr); r = zd_ioread32_locked(chip, value, addr);
mutex_unlock(&chip->mutex); mutex_unlock(&chip->mutex);
...@@ -271,7 +269,6 @@ int zd_iowrite16(struct zd_chip *chip, zd_addr_t addr, u16 value) ...@@ -271,7 +269,6 @@ int zd_iowrite16(struct zd_chip *chip, zd_addr_t addr, u16 value)
{ {
int r; int r;
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
mutex_lock(&chip->mutex); mutex_lock(&chip->mutex);
r = zd_iowrite16_locked(chip, value, addr); r = zd_iowrite16_locked(chip, value, addr);
mutex_unlock(&chip->mutex); mutex_unlock(&chip->mutex);
...@@ -282,7 +279,6 @@ int zd_iowrite32(struct zd_chip *chip, zd_addr_t addr, u32 value) ...@@ -282,7 +279,6 @@ int zd_iowrite32(struct zd_chip *chip, zd_addr_t addr, u32 value)
{ {
int r; int r;
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
mutex_lock(&chip->mutex); mutex_lock(&chip->mutex);
r = zd_iowrite32_locked(chip, value, addr); r = zd_iowrite32_locked(chip, value, addr);
mutex_unlock(&chip->mutex); mutex_unlock(&chip->mutex);
...@@ -294,7 +290,6 @@ int zd_ioread32v(struct zd_chip *chip, const zd_addr_t *addresses, ...@@ -294,7 +290,6 @@ int zd_ioread32v(struct zd_chip *chip, const zd_addr_t *addresses,
{ {
int r; int r;
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
mutex_lock(&chip->mutex); mutex_lock(&chip->mutex);
r = zd_ioread32v_locked(chip, values, addresses, count); r = zd_ioread32v_locked(chip, values, addresses, count);
mutex_unlock(&chip->mutex); mutex_unlock(&chip->mutex);
...@@ -306,7 +301,6 @@ int zd_iowrite32a(struct zd_chip *chip, const struct zd_ioreq32 *ioreqs, ...@@ -306,7 +301,6 @@ int zd_iowrite32a(struct zd_chip *chip, const struct zd_ioreq32 *ioreqs,
{ {
int r; int r;
ZD_ASSERT(!mutex_is_locked(&chip->mutex));
mutex_lock(&chip->mutex); mutex_lock(&chip->mutex);
r = zd_iowrite32a_locked(chip, ioreqs, count); r = zd_iowrite32a_locked(chip, ioreqs, count);
mutex_unlock(&chip->mutex); mutex_unlock(&chip->mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册