diff mbox

[1/3] cbus: tahvo: Fix build breakage caused by deprecated initializer removal

Message ID 1303154492-13520-1-git-send-email-jhnikula@gmail.com (mailing list archive)
State Accepted
Commit dff5b0699bcab4cada24dabdace58f65a1490dd3
Headers show

Commit Message

Jarkko Nikula April 18, 2011, 7:21 p.m. UTC
Use DEFINE_SPINLOCK() for static spinlock initialization as the commit
d04fa5a "locking: Remove deprecated lock initializers" removes the
deprecated SPIN_LOCK_UNLOCKED. Since tahvo_lock is not used elsewhere than
tahvo.c it can be removed from tahvo.h too.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
---
 drivers/cbus/tahvo.c |    2 +-
 drivers/cbus/tahvo.h |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

Comments

Tony Lindgren April 19, 2011, 7:07 a.m. UTC | #1
* Jarkko Nikula <jhnikula@gmail.com> [110418 12:18]:
> Use DEFINE_SPINLOCK() for static spinlock initialization as the commit
> d04fa5a "locking: Remove deprecated lock initializers" removes the
> deprecated SPIN_LOCK_UNLOCKED. Since tahvo_lock is not used elsewhere than
> tahvo.c it can be removed from tahvo.h too.

Thanks pushed all three. Looks like TAHVO_USB still fails
to compile as the otg_set_transceiver may not be compiled.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jarkko Nikula April 19, 2011, 7:53 a.m. UTC | #2
On Tue, 19 Apr 2011 00:07:24 -0700
Tony Lindgren <tony@atomide.com> wrote:

> * Jarkko Nikula <jhnikula@gmail.com> [110418 12:18]:
> > Use DEFINE_SPINLOCK() for static spinlock initialization as the commit
> > d04fa5a "locking: Remove deprecated lock initializers" removes the
> > deprecated SPIN_LOCK_UNLOCKED. Since tahvo_lock is not used elsewhere than
> > tahvo.c it can be removed from tahvo.h too.
> 
> Thanks pushed all three. Looks like TAHVO_USB still fails
> to compile as the otg_set_transceiver may not be compiled.
> 
True, it fails if CONFIG_OTG_UTILS is not set and it was selected
by musb in my config. I'll send a Kconfig fix for that.
diff mbox

Patch

diff --git a/drivers/cbus/tahvo.c b/drivers/cbus/tahvo.c
index 8e2e669..45318d9 100644
--- a/drivers/cbus/tahvo.c
+++ b/drivers/cbus/tahvo.c
@@ -53,7 +53,7 @@  static int tahvo_initialized;
 static int tahvo_is_betty;
 
 static struct tasklet_struct tahvo_tasklet;
-spinlock_t tahvo_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tahvo_lock);
 
 struct tahvo_irq_handler_desc {
 	int (*func)(unsigned long);
diff --git a/drivers/cbus/tahvo.h b/drivers/cbus/tahvo.h
index 6cb6600..e5ed990 100644
--- a/drivers/cbus/tahvo.h
+++ b/drivers/cbus/tahvo.h
@@ -63,6 +63,4 @@  int tahvo_get_backlight_level(void);
 int tahvo_get_max_backlight_level(void);
 void tahvo_set_backlight_level(int level);
 
-extern spinlock_t tahvo_lock;
-
 #endif /* __DRIVERS_CBUS_TAHVO_H */