From: Dan Williams <[email protected]> Duplicate what Zach Brown did for pr_debug in commit 8b2a1fd1b394c60eaa2587716102dd5e9b4e5990 [[email protected]: fix a couple of things which broke] Signed-off-by: Dan Williams <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- drivers/usb/core/hub.c | 4 +--- drivers/usb/host/ohci-hcd.c | 6 ------ include/linux/device.h | 6 +++++- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index b89a98e..7a60285 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -119,8 +119,7 @@ MODULE_PARM_DESC(use_both_schemes, "first one fails"); -#ifdef DEBUG -static inline char *portspeed (int portstatus) +static inline char *portspeed(int portstatus) { if (portstatus & (1 << USB_PORT_FEAT_HIGHSPEED)) return "480 Mb/s"; @@ -129,7 +128,6 @@ static inline char *portspeed (int portstatus) else return "12 Mb/s"; } -#endif /* Note that hdev or one of its children must be locked! */ static inline struct usb_hub *hdev_to_hub(struct usb_device *hdev) diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index f0d29ed..e8bbe8b 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -486,9 +486,6 @@ static int ohci_run (struct ohci_hcd *ohci) * or if bus glue did the same (e.g. for PCI add-in cards with * PCI PM support). */ - ohci_dbg (ohci, "resetting from state '%s', control = 0x%x\n", - hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS), - ohci_readl (ohci, &ohci->regs->control)); if ((ohci->hc_control & OHCI_CTRL_RWC) != 0 && !device_may_wakeup(hcd->self.controller)) device_init_wakeup(hcd->self.controller, 1); @@ -744,9 +741,6 @@ static void ohci_stop (struct usb_hcd *hcd) { struct ohci_hcd *ohci = hcd_to_ohci (hcd); - ohci_dbg (ohci, "stop %s controller (state 0x%02x)\n", - hcfs2string (ohci->hc_control & OHCI_CTRL_HCFS), - hcd->state); ohci_dump (ohci, 1); flush_scheduled_work(); diff --git a/include/linux/device.h b/include/linux/device.h index 8511d14..a0cd2ce 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -571,7 +571,11 @@ extern const char *dev_driver_string(struct device *dev); #define dev_dbg(dev, format, arg...) \ dev_printk(KERN_DEBUG , dev , format , ## arg) #else -#define dev_dbg(dev, format, arg...) do { (void)(dev); } while (0) +static inline int __attribute__ ((format (printf, 2, 3))) +dev_dbg(struct device * dev, const char * fmt, ...) +{ + return 0; +} #endif #define dev_err(dev, format, arg...) \ -- 1.5.1.2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [GIT PATCH] Driver core patches for 2.6.21
- From: Greg KH <[email protected]>
- [PATCH 01/46] driver core: fix device_add error path
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 02/46] driver core: fix namespace issue with devices assigned to classes
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 03/46] dev_printk and new-style class devices
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 05/46] driver core: Use attribute groups in struct device_type
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 06/46] Driver core: add name to device_type
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 07/46] kobject: kobject_shadow_add cleanup
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 08/46] driver core: per-subsystem multithreaded probing
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 09/46] powerpc: make it compile for multithread change
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 10/46] driver core: don't fail attaching the device if it cannot be bound
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 11/46] Driver core: remove unneeded completion from driver release path
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 12/46] kref: fix CPU ordering with respect to krefs
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 13/46] Driver core: notify userspace of network device renames
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 14/46] Driver core: suppress uevents via filter
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 15/46] Driver core: switch firmware_class to uevent_suppress.
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 16/46] uevent: use add_uevent_var() instead of open coding it
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 17/46] Driver core: add suspend() and resume() to struct device_type
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 18/46] Kobject: kobject_uevent.c: Collapse unnecessary loop nesting (top_kobj)
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 19/46] kobject: kobject_add() reference leak
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 20/46] Driver core: remove use of rwsem
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 21/46] SCSI: use the proper semaphore to protect the class lists
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 22/46] USB: remove use of the bus rwsem, as it doesn't really protect anything.
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 23/46] PNP: stop using the subsystem rwsem
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 24/46] Input: serio - do not touch bus's rwsem
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 25/46] Input: gameport - do not touch bus's rwsem
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 26/46] IDE: remove rwsem use from ide-proc core
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 27/46] IEEE1394: remove rwsem use from ieee1394 core
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 28/46] PHY: remove rwsem use from phy core
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 29/46] qeth: Remove usage of subsys.rwsem
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 30/46] kobject core: remove rwsem from struct subsystem
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 31/46] Driver core: make uevent-environment available in uevent-file
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 32/46] Driver core: warn when userspace writes to the uevent file in a non-supported way
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 33/46] kobject: Comment and warning fixes to kobject.c
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 34/46] the overdue removal of the mount/umount uevents
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 35/46] debugfs: Add debugfs_create_u64()
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 36/46] driver core: bus_add_driver should return an error if no bus
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 37/46] Driver core: use mutex instead of semaphore in DMA pool handler
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 38/46] sysfs: bin.c printk fix
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 39/46] s390: cio: Delay uevents for subchannels
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 40/46] device_schedule_callback() needs a module reference
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 41/46] security: prevent permission checking of file removal via sysfs_remove_group()
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 42/46] define platform wakeup hook, use in pci_enable_wake()
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 43/46] s2ram: add arch irq disable/enable hooks
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 44/46] mod_sysfs_setup() doesn't return errno when kobject_add_dir() failure occurs
- From: Greg Kroah-Hartman <[email protected]>
- [PATCH 45/46] drivers/base/attribute_container.c: use mutex instead of binary semaphore
- From: Greg Kroah-Hartman <[email protected]>
- [GIT PATCH] Driver core patches for 2.6.21
- Prev by Date: [PATCH 27/46] IEEE1394: remove rwsem use from ieee1394 core
- Next by Date: [PATCH 45/46] drivers/base/attribute_container.c: use mutex instead of binary semaphore
- Previous by thread: [PATCH 45/46] drivers/base/attribute_container.c: use mutex instead of binary semaphore
- Next by thread: Re: [PATCH 28/46] PHY: remove rwsem use from phy core
- Index(es):