Re: [PATCH] hwmon class driver registration with a device number

From: Greg KH
Date: Thu Oct 06 2011 - 14:32:49 EST

On Thu, Oct 06, 2011 at 09:40:11AM +0530, Himanshu Chauhan wrote:
> Hi Greg,
> >
> > How do you later remove a device created with this new interface? As it
> > is, I think the existing calls will fail, right?
> >
> If I have not missed out anything from hwmon_device_unregister(), it shouldn't
> fail. Why did you point that out?

If you create a device with a call to device_create() with a dev_t set,
it is usually cleaned up with a call to device_destroy(), but you are
right, a simple call to device_unregister() will still work properly.

So nevermind, sorry for the noise.

What you do need to determine is if this is a device node you really
want to be creating in this manner, as it is a new user/kernel API,

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
Please read the FAQ at