summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-07-03 15:05:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 16:07:43 -0700
commit1d0c48e66b3f1cf40660f69a87f55af3df0b2ae3 (patch)
tree0b3531877c44659181ae17098ee581f09833f40e /include
parent8318fde4ac78f6793b1cbaf57659902253a61617 (diff)
lcd: add devm_lcd_device_{register,unregister}()
These functions allow the driver core to automatically clean up any allocation made by lcd drivers. Thus it simplifies the error paths. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/lcd.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/lcd.h b/include/linux/lcd.h
index e00c3b0ebc6b..504f6246f38f 100644
--- a/include/linux/lcd.h
+++ b/include/linux/lcd.h
@@ -112,7 +112,12 @@ static inline void lcd_set_power(struct lcd_device *ld, int power)
extern struct lcd_device *lcd_device_register(const char *name,
struct device *parent, void *devdata, struct lcd_ops *ops);
+extern struct lcd_device *devm_lcd_device_register(struct device *dev,
+ const char *name, struct device *parent,
+ void *devdata, struct lcd_ops *ops);
extern void lcd_device_unregister(struct lcd_device *ld);
+extern void devm_lcd_device_unregister(struct device *dev,
+ struct lcd_device *ld);
#define to_lcd_device(obj) container_of(obj, struct lcd_device, dev)