PATCH: hald/addon - fix ioperm usage
Thomas Meyer
thomas at m3y3r.de
Thu Apr 30 11:00:49 PDT 2009
Hi,
See also this bug report:
http://bugzilla.kernel.org/show_bug.cgi?id=13156
Non-tested patch:
$ git diff
diff --git a/hald/linux/addons/addon-imac-backlight.c
b/hald/linux/addons/addon-imac-backlight.c
index b082f89..03f62fe 100644
--- a/hald/linux/addons/addon-imac-backlight.c
+++ b/hald/linux/addons/addon-imac-backlight.c
@@ -152,7 +152,7 @@ main (int argc, char **argv)
if (!libhal_device_addon_is_ready (halctx, udi, &err))
return -4;
- if (ioperm(0xB2, 0xB3, 1) < 0)
+ if (ioperm(0xB2, 2, 1) < 0)
{
HAL_ERROR (("ioperm failed (you should be root)."));
exit(1);
diff --git a/hald/linux/addons/addon-macbookpro-backlight.c
b/hald/linux/addons/addon-macbookpro-backlight.c
index 3c1a799..f2482c8 100644
--- a/hald/linux/addons/addon-macbookpro-backlight.c
+++ b/hald/linux/addons/addon-macbookpro-backlight.c
@@ -502,7 +502,7 @@ main (int argc, char *argv[])
state = INREG(0x7ae4);
OUTREG(0x7ae4, state);
- if (ioperm (0x300, 0x304, 1) < 0) {
+ if (ioperm (0x300, 5, 1) < 0) {
HAL_ERROR (("ioperm failed (you should be root)."));
exit(1);
}
More information about the hal
mailing list