Re: [PATCH 1/4] driver core: add root_device_register()

From: Cornelia Huck
Date: Fri Dec 12 2008 - 03:43:04 EST


On Thu, 11 Dec 2008 18:23:27 +0000,
Mark McLoughlin <markmc@xxxxxxxxxx> wrote:

> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 8c2cc26..20e5825 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -1196,6 +1196,93 @@ EXPORT_SYMBOL_GPL(put_device);
> EXPORT_SYMBOL_GPL(device_create_file);
> EXPORT_SYMBOL_GPL(device_remove_file);
>
> +struct root_device
> +{
> + struct device dev;
> + struct module *owner;
> +};
> +
> +static void root_device_release(struct device *dev)
> +{

You need to get the root device here and free that.

> + kfree(dev);
> +}
--
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/