* [PATCH 1/3] cpufreq: Fix compiler warning @ 2005-11-08 16:26 Peter Osterlund 2005-11-08 16:28 ` [PATCH 2/3] pktcdvd: Remove subscribers-only list Peter Osterlund 0 siblings, 1 reply; 3+ messages in thread From: Peter Osterlund @ 2005-11-08 16:26 UTC (permalink / raw) To: Andrew Morton; +Cc: linux-kernel Fixe unused variable compiler warning when building cpufreq.c without CONFIG_SMP. Signed-off-by: Peter Osterlund <petero2@telia.com> --- 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 - petero2@telia.com http://web.telia.com/~u89404340 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/3] pktcdvd: Remove subscribers-only list 2005-11-08 16:26 [PATCH 1/3] cpufreq: Fix compiler warning Peter Osterlund @ 2005-11-08 16:28 ` Peter Osterlund 2005-11-08 16:34 ` [PATCH 3/3] pktcdvd: Use bd_claim to get exclusive access Peter Osterlund 0 siblings, 1 reply; 3+ messages in thread From: Peter Osterlund @ 2005-11-08 16:28 UTC (permalink / raw) To: Andrew Morton; +Cc: linux-kernel From: Adrian Bunk <bunk@stusta.de> Remove maintainer entry for a subscribers-only mailing list. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Peter Osterlund <petero2@telia.com> --- 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: petero2@telia.com L: linux-kernel@vger.kernel.org -L: packet-writing@suse.com S: Maintained POSIX CLOCKS and TIMERS -- Peter Osterlund - petero2@telia.com http://web.telia.com/~u89404340 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/3] pktcdvd: Use bd_claim to get exclusive access 2005-11-08 16:28 ` [PATCH 2/3] pktcdvd: Remove subscribers-only list Peter Osterlund @ 2005-11-08 16:34 ` Peter Osterlund 0 siblings, 0 replies; 3+ messages in thread From: Peter Osterlund @ 2005-11-08 16:34 UTC (permalink / raw) To: Andrew Morton; +Cc: linux-kernel 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 <petero2@telia.com> --- 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 - petero2@telia.com http://web.telia.com/~u89404340 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-11-08 16:34 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-11-08 16:26 [PATCH 1/3] cpufreq: Fix compiler warning Peter Osterlund 2005-11-08 16:28 ` [PATCH 2/3] pktcdvd: Remove subscribers-only list Peter Osterlund 2005-11-08 16:34 ` [PATCH 3/3] pktcdvd: Use bd_claim to get exclusive access Peter Osterlund
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome