From mboxrd@z Thu Jan 1 00:00:00 1970 From: greg@kroah.com (Greg KH) Date: Thu, 6 Oct 2011 11:25:00 -0700 Subject: [PATCH] hwmon class driver registration with a device number In-Reply-To: <20111006041011.GB2125@ubuntu.ubuntu-domain> References: <1317834791-2803-1-git-send-email-hschauhan@nulltrace.org> <20111005193359.GB26664@kroah.com> <20111006041011.GB2125@ubuntu.ubuntu-domain> Message-ID: <20111006182500.GA18607@kroah.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org 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, right? greg k-h