lkml.org 
[lkml]   [2003]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers/cdrom/isp16.c check_region() fix
On Mon, Dec 29, 2003 at 02:42:23PM -0500, Omkhar Arasaratnam wrote:
> --- /usr/src/linux/drivers/cdrom/isp16.c 2001-09-07 12:28:38.000000000 -0400
> +++ drivers/cdrom/isp16.c 2003-12-29 14:07:24.000000000 -0500
> @@ -121,11 +121,12 @@
> return (0);
> }
>
> - if (check_region(ISP16_IO_BASE, ISP16_IO_SIZE)) {
> + if (!request_region(ISP16_IO_BASE, ISP16_IO_SIZE,"isp16")) {
> printk("ISP16: i/o ports already in use.\n");
> return (-EIO);
> }
> -
> + release_region(ISP16_IO_BASE, ISP16_IO_SIZE);

This doesn't really buy you anything. You must claim the I/O ports as long
as you're possibly using them - i.e. claim them early when probing for
the device, and release them only when you're done with the device.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.024 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site