Re: [PATCH] x86: EuroBraille/Iris power off

From: Valdis . Kletnieks
Date: Mon Sep 13 2010 - 11:13:46 EST


On Mon, 13 Sep 2010 12:07:19 +0200, Shérab said:

> +static int iris_init(void)
> +{
> + unsigned char status = inb(IRIS_GIO_INPUT);
> + if (status == IRIS_GIO_NODEV) {
> + printk(KERN_ERR "This machine does not seem to be an Iris. Power_off handler not installed.\n");
> + return -ENODEV;
> + }

Is it actually safe to assume that this will do the right thing on a machine that
is a non-Iris that has something *else* at that I/O address? Any further sanity
checking we can do? (For that matter, are there machines that will get indigestion
at this sort of unexpected inb() access?)

Attachment: pgp00000.pgp
Description: PGP signature