public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Omkhar Arasaratnam <omkhar@rogers.com>
Cc: axeboe@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/cdrom/isp16.c check_region() fix
Date: Mon, 29 Dec 2003 20:04:59 +0000	[thread overview]
Message-ID: <20031229200459.A31614@infradead.org> (raw)
In-Reply-To: <20031229194222.GA26019@omkhar.ibm.com>; from omkhar@rogers.com on Mon, Dec 29, 2003 at 02:42:23PM -0500

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.


  reply	other threads:[~2003-12-29 20:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-29 19:42 [PATCH] drivers/cdrom/isp16.c check_region() fix Omkhar Arasaratnam
2003-12-29 20:04 ` Christoph Hellwig [this message]
2003-12-29 20:13 ` viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031229200459.A31614@infradead.org \
    --to=hch@infradead.org \
    --cc=axeboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=omkhar@rogers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox