lkml.org 
[lkml]   [2006]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectPATCH: SBC EPX does not check/claim I/O ports it uses
From
Date
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);
-
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: 2006-01-17 18:56    [W:0.077 / U:1.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site