Subject: Re: [PATCH 2/2 v2] [POWERPC] Ignore disabled serial ports

From: Arnd Bergmann <[email-masked]>
Date: Mon, 3 Mar 2008 04:43:42 +0100

On Saturday 01 March 2008, Josh Boyer wrote:
> --- linux-2.6.orig/drivers/serial/of_serial.c
> +++ linux-2.6/drivers/serial/of_serial.c
> @@ -72,6 +72,11 @@ static int __devinit of_platform_serial_
>         int port_type;
>         int ret;
>  
> +       if (!of_device_is_available(ofdev->node)) {
> +               dev_info(&ofdev->dev, "Disabled serial port.  Ignored\n");
> +               return -ENODEV;
> +       }
> +
>         if (of_find_property(ofdev->node, "used-by-rtas", NULL))
>                 return -EBUSY;

I wonder whether we should move the check for "used-by-rtas" into the
of_device_is_available function. I understand that used-by-rtas is
another way of expressing the idea that the kernel is not supposed to
access the specific device. In this case, the device is physically
present, but is not available to the OS.

	Arnd <><