Skip to contentSkip to conversation

cpufreq: Fix compiler warning

PATCH New Peter Osterlund 1 participant 3 messages Nov 8, 2005

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

PATCH 1/3 cpufreq: Fix compiler warning

Fixe unused variable compiler warning when building cpufreq.c without CONFIG_SMP.

---

 drivers/cpufreq/cpufreq.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/cpufreq/cpufreq.c +2 -4
index 25acf47..4b11215 100644
@@ -694,10 +694,6 @@ static int cpufreq_remove_dev (struct sy
 	unsigned int cpu = sys_dev->id;
 	unsigned long flags;
 	struct cpufreq_policy *data;
-	struct sys_device *cpu_sys_dev;
-#ifdef CONFIG_SMP
-	unsigned int j;
-#endif
 
 	cpufreq_debug_disable_ratelimit();
 	dprintk("unregistering CPU %u\n", cpu);
@@ -741,6 +737,8 @@ static int cpufreq_remove_dev (struct sy
 	 * links afterwards.
 	 */
 	if (unlikely(cpus_weight(data->cpus) > 1)) {
+		struct sys_device *cpu_sys_dev;
+		unsigned int j;
 		for_each_cpu_mask(j, data->cpus) {
 			if (j == cpu)
 				continue;
Signature · 2 lines
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340
#1 lore raw

PATCH 2/3 pktcdvd: Remove subscribers-only list

From: Adrian Bunk <[email protected]>

Remove maintainer entry for a subscribers-only mailing list.

---

 MAINTAINERS |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
MAINTAINERS +0 -1
index 995bfd8..3028d4b 100644
@@ -1970,7 +1970,6 @@ PKTCDVD DRIVER
 P:	Peter Osterlund
 M:	[email protected]
 L:	[email protected]
-L:	[email protected]
 S:	Maintained
 
 POSIX CLOCKS and TIMERS
Signature · 2 lines
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340
#2 lore raw

PATCH 3/3 pktcdvd: Use bd_claim to get exclusive access

Use bd_claim() when opening the cdrom device to prevent user space programs such as cdrecord, hald and kded from interfering with the burning process.

---

 drivers/block/pktcdvd.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
drivers/block/pktcdvd.c +9 -3
index 59e5982..78dbea3 100644
@@ -1955,9 +1955,12 @@ static int pkt_open_dev(struct pktcdvd_d
 	if ((ret = blkdev_get(pd->bdev, FMODE_READ, O_RDONLY)))
 		goto out;
 
+	if ((ret = bd_claim(pd->bdev, pd)))
+		goto out_putdev;
+
 	if ((ret = pkt_get_last_written(pd, &lba))) {
 		printk("pktcdvd: pkt_get_last_written failed\n");
-		goto out_putdev;
+		goto out_unclaim;
 	}
 
 	set_capacity(pd->disk, lba << 2);
@@ -1967,7 +1970,7 @@ static int pkt_open_dev(struct pktcdvd_d
 	q = bdev_get_queue(pd->bdev);
 	if (write) {
 		if ((ret = pkt_open_write(pd)))
-			goto out_putdev;
+			goto out_unclaim;
 		/*
 		 * Some CDRW drives can not handle writes larger than one packet,
 		 * even if the size is a multiple of the packet size.
@@ -1982,13 +1985,15 @@ static int pkt_open_dev(struct pktcdvd_d
 	}
 
 	if ((ret = pkt_set_segment_merging(pd, q)))
-		goto out_putdev;
+		goto out_unclaim;
 
 	if (write)
 		printk("pktcdvd: %lukB available on disc\n", lba << 1);
 
 	return 0;
 
+out_unclaim:
+	bd_release(pd->bdev);
 out_putdev:
 	blkdev_put(pd->bdev);
 out:
@@ -2007,6 +2012,7 @@ static void pkt_release_dev(struct pktcd
 	pkt_lock_door(pd, 0);
 
 	pkt_set_speed(pd, MAX_SPEED, MAX_SPEED);
+	bd_release(pd->bdev);
 	blkdev_put(pd->bdev);
 }
 
Signature · 2 lines
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340