Commit 7b8712e5 authored by Emil Medve's avatar Emil Medve Committed by Greg Kroah-Hartman

driver core: Make the dev_*() family of macros in device.h complete

Removed duplicates defined elsewhere
Signed-off-by: default avatarEmil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 30a468b1
...@@ -259,12 +259,6 @@ static inline const char *state_name(struct isp1301 *isp) ...@@ -259,12 +259,6 @@ static inline const char *state_name(struct isp1301 *isp)
return state_string(isp->otg.state); return state_string(isp->otg.state);
} }
#ifdef VERBOSE
#define dev_vdbg dev_dbg
#else
#define dev_vdbg(dev, fmt, arg...) do{}while(0)
#endif
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
/* NOTE: some of this ISP1301 setup is specific to H2 boards; /* NOTE: some of this ISP1301 setup is specific to H2 boards;
......
...@@ -106,12 +106,6 @@ enum debuglevel { ...@@ -106,12 +106,6 @@ enum debuglevel {
activated */ activated */
}; };
/* missing from linux/device.h ... */
#ifndef dev_notice
#define dev_notice(dev, format, arg...) \
dev_printk(KERN_NOTICE , dev , format , ## arg)
#endif
/* Kernel message macros for situations where dev_printk and friends cannot be /* Kernel message macros for situations where dev_printk and friends cannot be
* used for lack of reliable access to a device structure. * used for lack of reliable access to a device structure.
* linux/usb.h already contains these but in an obsolete form which clutters * linux/usb.h already contains these but in an obsolete form which clutters
......
...@@ -565,6 +565,21 @@ extern const char *dev_driver_string(struct device *dev); ...@@ -565,6 +565,21 @@ extern const char *dev_driver_string(struct device *dev);
#define dev_printk(level, dev, format, arg...) \ #define dev_printk(level, dev, format, arg...) \
printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg) printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg)
#define dev_emerg(dev, format, arg...) \
dev_printk(KERN_EMERG , dev , format , ## arg)
#define dev_alert(dev, format, arg...) \
dev_printk(KERN_ALERT , dev , format , ## arg)
#define dev_crit(dev, format, arg...) \
dev_printk(KERN_CRIT , dev , format , ## arg)
#define dev_err(dev, format, arg...) \
dev_printk(KERN_ERR , dev , format , ## arg)
#define dev_warn(dev, format, arg...) \
dev_printk(KERN_WARNING , dev , format , ## arg)
#define dev_notice(dev, format, arg...) \
dev_printk(KERN_NOTICE , dev , format , ## arg)
#define dev_info(dev, format, arg...) \
dev_printk(KERN_INFO , dev , format , ## arg)
#ifdef DEBUG #ifdef DEBUG
#define dev_dbg(dev, format, arg...) \ #define dev_dbg(dev, format, arg...) \
dev_printk(KERN_DEBUG , dev , format , ## arg) dev_printk(KERN_DEBUG , dev , format , ## arg)
...@@ -586,15 +601,6 @@ dev_vdbg(struct device * dev, const char * fmt, ...) ...@@ -586,15 +601,6 @@ dev_vdbg(struct device * dev, const char * fmt, ...)
} }
#endif #endif
#define dev_err(dev, format, arg...) \
dev_printk(KERN_ERR , dev , format , ## arg)
#define dev_info(dev, format, arg...) \
dev_printk(KERN_INFO , dev , format , ## arg)
#define dev_warn(dev, format, arg...) \
dev_printk(KERN_WARNING , dev , format , ## arg)
#define dev_notice(dev, format, arg...) \
dev_printk(KERN_NOTICE , dev , format , ## arg)
/* Create alias, so I can be autoloaded. */ /* Create alias, so I can be autoloaded. */
#define MODULE_ALIAS_CHARDEV(major,minor) \ #define MODULE_ALIAS_CHARDEV(major,minor) \
MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment