mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: calin@ajvar.org, linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: PATCH: SBC EPX does not check/claim I/O ports it uses
Date: Tue, 17 Jan 2006 17:52:31 +0000	[thread overview]
Message-ID: <1137520351.14135.40.camel@localhost.localdomain> (raw)

Signed-off-by: Alan Cox <alan@redhat.com>

Can't test this as I lack the hardware, can you check it seems right
Calin.

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.16-rc1/drivers/char/watchdog/sbc_epx_c3.c linux-2.6.16-rc1/drivers/char/watchdog/sbc_epx_c3.c
--- linux.vanilla-2.6.16-rc1/drivers/char/watchdog/sbc_epx_c3.c	2006-01-17 15:52:53.000000000 +0000
+++ linux-2.6.16-rc1/drivers/char/watchdog/sbc_epx_c3.c	2006-01-17 15:58:47.000000000 +0000
@@ -25,6 +25,7 @@
 #include <linux/notifier.h>
 #include <linux/reboot.h>
 #include <linux/init.h>
+#include <linux/ioport.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 
@@ -180,6 +181,9 @@
 static int __init watchdog_init(void)
 {
 	int ret;
+	
+	if (!request_region(EPXC3_WATCHDOG_CTL_REG, 2, "epxc3_watchdog"))
+		return -EBUSY;
 
 	ret = register_reboot_notifier(&epx_c3_notifier);
 	if (ret) {
@@ -205,6 +209,7 @@
 {
 	misc_deregister(&epx_c3_miscdev);
 	unregister_reboot_notifier(&epx_c3_notifier);
+	release_region(EPXC3_WATCHDOG_CTL_REG, 2);
 }
 
 module_init(watchdog_init);


             reply	other threads:[~2006-01-17 17:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-17 17:52 Alan Cox [this message]
2006-01-17 18:03 ` Bartlomiej Zolnierkiewicz
2006-01-17 18:09   ` Alan Cox
2006-01-17 18:42   ` PATCH: SBC EPX does not check/claim I/O ports it uses (2nd Edition) Alan Cox
2006-01-18 12:10     ` Jiri Slaby
2006-01-18 12:20       ` Andrew Morton

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=1137520351.14135.40.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=calin@ajvar.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®