Messages in this thread | | | Date | Mon, 7 Jan 2013 11:26:02 -0800 | From | Greg KH <> | Subject | Re: [PATCH 3/9] Thermal: Add APIs to bind cdev to new zone structure |
| |
On Mon, Jan 07, 2013 at 12:43:20PM +0530, Durgadoss R wrote: > +struct thermal_cooling_device *get_cdev_by_name(const char *name) > +{ > + struct thermal_cooling_device *pos; > + struct thermal_cooling_device *cdev = NULL; > + > + mutex_lock(&cdev_list_lock); > + for_each_cdev(pos) { > + if (!strnicmp(pos->type, name, THERMAL_NAME_LENGTH)) { > + cdev = pos; > + break; > + } > + } > + mutex_unlock(&cdev_list_lock); > + return cdev; > +} > +EXPORT_SYMBOL(get_cdev_by_name);
EXPORT_SYMBOL_GPL?
You also forgot to increment the reference count, which is required for all reference counted objects.
thanks,
greg k-h
| |