2005-11-08 16:26:43

by Peter Osterlund

[permalink] [raw]
Subject: [PATCH 1/3] cpufreq: Fix compiler warning

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

Signed-off-by: Peter Osterlund <[email protected]>
---

drivers/cpufreq/cpufreq.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 25acf47..4b11215 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -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;

--
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340


2005-11-08 16:28:56

by Peter Osterlund

[permalink] [raw]
Subject: [PATCH 2/3] pktcdvd: Remove subscribers-only list

From: Adrian Bunk <[email protected]>

Remove maintainer entry for a subscribers-only mailing list.

Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Peter Osterlund <[email protected]>
---

MAINTAINERS | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 995bfd8..3028d4b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1970,7 +1970,6 @@ PKTCDVD DRIVER
P: Peter Osterlund
M: [email protected]
L: [email protected]
-L: [email protected]
S: Maintained

POSIX CLOCKS and TIMERS

--
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340

2005-11-08 16:34:46

by Peter Osterlund

[permalink] [raw]
Subject: [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.

Signed-off-by: Peter Osterlund <[email protected]>
---

drivers/block/pktcdvd.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 59e5982..78dbea3 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -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);
}


--
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340