Re: [PATCH] ppc64: VIO support, from Dave Boutcher, Hollis Blanchard and Santiago Leon
From: Greg KH
Date: Mon Jan 19 2004 - 17:34:54 EST
On Mon, Jan 19, 2004 at 06:21:43PM +0000, Linux Kernel Mailing List wrote:
> +static inline int vio_module_init(struct vio_driver *drv)
> +{
> + int rc = vio_register_driver (drv);
> +
> + if (rc > 0)
> + return 0;
> +
> + /* iff CONFIG_HOTPLUG and built into kernel, we should
> + * leave the driver around for future hotplug events.
> + * For the module case, a hotplug daemon of some sort
> + * should load a module in response to an insert event. */
> +#if defined(CONFIG_HOTPLUG) && !defined(MODULE)
> + if (rc == 0)
> + return 0;
> +#else
> + if (rc == 0)
> + rc = -ENODEV;
> +#endif
> +
> + /* if we get here, we need to clean up vio driver instance
> + * and return some sort of error */
> +
> + return rc;
> +}
> +
> +#endif /* _PHYP_H */
Ick ick ick. I thought you all were not going to add this function, but
just use vio_register_driver() on it's own? Loading a driver should not
depend on CONFIG_HOTPLUG, as we now have different ways we can bind
drivers to devices after they are loaded (see the new_id stuff for pci
devices as an example.)
In fact I have a patch in my queue to clean this logic up for PCI
drivers from rmk that I need to apply soon...
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/