Skip to contentSkip to conversation

ata: Convert deprecated static spinlock_t lock

PATCH Applied Pradeep Singh Rautela 2 participants 2 messages May 29, 2008 – May 30, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: Convert deprecated static spinlock_t lock

Replace deprecated static spinlock_t instance to static DEFINE_SPINLOCK(lock).

---
 drivers/ata/libata-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ata/libata-core.c +1 -1
index 3c89f20..cc816ca 100644
@@ -5403,7 +5403,7 @@ static void ata_host_stop(struct device *gendev, void *res)
  */
 static void ata_finalize_port_ops(struct ata_port_operations *ops)
 {
-	static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+	static DEFINE_SPINLOCK(lock);
 	const struct ata_port_operations *cur;
 	void **begin = (void **)ops;
 	void **end = (void **)&ops->inherits;
Signature · 1 line
1.5.5.1
Applied
#1 lore raw

Re: [PATCH v2.6.26-rc4] ata: Convert deprecated static spinlock_t

Quoted 12 lines · Pradeep Singh Rautela

Replace deprecated static spinlock_t instance to static DEFINE_SPINLOCK(lock).

---
 drivers/ata/libata-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/ata/libata-core.c +0 -0
index 3c89f20..cc816ca 100644

drivers/ata/libata-core.c static void ata_host_stop(struct device *gendev, void *res) · line 5408

Quoted 7 lines
drivers/ata/libata-core.c +1 -1
@@ -5403,7 +5403,7 @@ static void ata_host_stop(struct device *gendev, void *res)
  */
 static void ata_finalize_port_ops(struct ata_port_operations *ops)
 {
-	static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+	static DEFINE_SPINLOCK(lock);
 	const struct ata_port_operations *cur;
 	void **begin = (void **)ops;

applied