Russell King wrote: >The allocation function should initialise class_dev as much as possible. >The registration function should add the class device with the class >model. The unregistration should remove the class device from the class >model, but _not_ free it. The free function should drop the last >reference to the class device, which results in the remove function >(eventually) being called. Finally, the remove function can free the >mmc_host. > > New patch according to above system. I've moved the naming a bit earlier to avoid having a nameless kobj floating around. >Also note that since we have a class_dev, the mmc_host 'dev' field can >be removed. However, we'll probably have to update the host drivers >to do this, so it should be a separate patch. > > > I believe there's a bit of abstraction to be gained from not poking around inside the class_dev struct in too many places. It's not like we're wasting any large amounts of memory. Rgds Pierre