Commit f45ba776 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman

USB: Convert concatenated __FILE__ to %s, __FILE__

Reduces string space a bit
Neaten a macro redefine of dbg
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 759f3634
...@@ -134,21 +134,21 @@ ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) ...@@ -134,21 +134,21 @@ ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
hcd->rsrc_len = res.end - res.start + 1; hcd->rsrc_len = res.end - res.start + 1;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
printk(KERN_ERR __FILE__ ": request_mem_region failed\n"); printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
rv = -EBUSY; rv = -EBUSY;
goto err_rmr; goto err_rmr;
} }
irq = irq_of_parse_and_map(dn, 0); irq = irq_of_parse_and_map(dn, 0);
if (irq == NO_IRQ) { if (irq == NO_IRQ) {
printk(KERN_ERR __FILE__ ": irq_of_parse_and_map failed\n"); printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__);
rv = -EBUSY; rv = -EBUSY;
goto err_irq; goto err_irq;
} }
hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
if (!hcd->regs) { if (!hcd->regs) {
printk(KERN_ERR __FILE__ ": ioremap failed\n"); printk(KERN_ERR "%s: ioremap failed\n", __FILE__);
rv = -ENOMEM; rv = -ENOMEM;
goto err_ioremap; goto err_ioremap;
} }
...@@ -161,9 +161,9 @@ ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) ...@@ -161,9 +161,9 @@ ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
ehci->ohci_hcctrl_reg = ioremap(res.start + ehci->ohci_hcctrl_reg = ioremap(res.start +
OHCI_HCCTRL_OFFSET, OHCI_HCCTRL_LEN); OHCI_HCCTRL_OFFSET, OHCI_HCCTRL_LEN);
else else
pr_debug(__FILE__ ": no ohci offset in fdt\n"); pr_debug("%s: no ohci offset in fdt\n", __FILE__);
if (!ehci->ohci_hcctrl_reg) { if (!ehci->ohci_hcctrl_reg) {
pr_debug(__FILE__ ": ioremap for ohci hcctrl failed\n"); pr_debug("%s: ioremap for ohci hcctrl failed\n", __FILE__);
} else { } else {
ehci->has_amcc_usb23 = 1; ehci->has_amcc_usb23 = 1;
} }
...@@ -241,7 +241,7 @@ static int ehci_hcd_ppc_of_remove(struct of_device *op) ...@@ -241,7 +241,7 @@ static int ehci_hcd_ppc_of_remove(struct of_device *op)
else else
release_mem_region(res.start, 0x4); release_mem_region(res.start, 0x4);
else else
pr_debug(__FILE__ ": no ohci offset in fdt\n"); pr_debug("%s: no ohci offset in fdt\n", __FILE__);
of_node_put(np); of_node_put(np);
} }
......
...@@ -177,21 +177,21 @@ ehci_hcd_xilinx_of_probe(struct of_device *op, const struct of_device_id *match) ...@@ -177,21 +177,21 @@ ehci_hcd_xilinx_of_probe(struct of_device *op, const struct of_device_id *match)
hcd->rsrc_len = res.end - res.start + 1; hcd->rsrc_len = res.end - res.start + 1;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
printk(KERN_ERR __FILE__ ": request_mem_region failed\n"); printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
rv = -EBUSY; rv = -EBUSY;
goto err_rmr; goto err_rmr;
} }
irq = irq_of_parse_and_map(dn, 0); irq = irq_of_parse_and_map(dn, 0);
if (irq == NO_IRQ) { if (irq == NO_IRQ) {
printk(KERN_ERR __FILE__ ": irq_of_parse_and_map failed\n"); printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__);
rv = -EBUSY; rv = -EBUSY;
goto err_irq; goto err_irq;
} }
hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
if (!hcd->regs) { if (!hcd->regs) {
printk(KERN_ERR __FILE__ ": ioremap failed\n"); printk(KERN_ERR "%s: ioremap failed\n", __FILE__);
rv = -ENOMEM; rv = -ENOMEM;
goto err_ioremap; goto err_ioremap;
} }
......
...@@ -53,13 +53,13 @@ urb_print(struct urb * urb, char * str, int small, int status) ...@@ -53,13 +53,13 @@ urb_print(struct urb * urb, char * str, int small, int status)
int i, len; int i, len;
if (usb_pipecontrol (pipe)) { if (usb_pipecontrol (pipe)) {
printk (KERN_DEBUG __FILE__ ": setup(8):"); printk (KERN_DEBUG "%s: setup(8):", __FILE__);
for (i = 0; i < 8 ; i++) for (i = 0; i < 8 ; i++)
printk (" %02x", ((__u8 *) urb->setup_packet) [i]); printk (" %02x", ((__u8 *) urb->setup_packet) [i]);
printk ("\n"); printk ("\n");
} }
if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) { if (urb->transfer_buffer_length > 0 && urb->transfer_buffer) {
printk (KERN_DEBUG __FILE__ ": data(%d/%d):", printk (KERN_DEBUG "%s: data(%d/%d):", __FILE__,
urb->actual_length, urb->actual_length,
urb->transfer_buffer_length); urb->transfer_buffer_length);
len = usb_pipeout (pipe)? len = usb_pipeout (pipe)?
......
...@@ -28,8 +28,8 @@ extern int usb_disabled(void); ...@@ -28,8 +28,8 @@ extern int usb_disabled(void);
static void lh7a404_start_hc(struct platform_device *dev) static void lh7a404_start_hc(struct platform_device *dev)
{ {
printk(KERN_DEBUG __FILE__ printk(KERN_DEBUG "%s: starting LH7A404 OHCI USB Controller\n",
": starting LH7A404 OHCI USB Controller\n"); __FILE__);
/* /*
* Now, carefully enable the USB clock, and take * Now, carefully enable the USB clock, and take
...@@ -39,14 +39,13 @@ static void lh7a404_start_hc(struct platform_device *dev) ...@@ -39,14 +39,13 @@ static void lh7a404_start_hc(struct platform_device *dev)
udelay(1000); udelay(1000);
USBH_CMDSTATUS = OHCI_HCR; USBH_CMDSTATUS = OHCI_HCR;
printk(KERN_DEBUG __FILE__ printk(KERN_DEBUG "%s: Clock to USB host has been enabled \n", __FILE__);
": Clock to USB host has been enabled \n");
} }
static void lh7a404_stop_hc(struct platform_device *dev) static void lh7a404_stop_hc(struct platform_device *dev)
{ {
printk(KERN_DEBUG __FILE__ printk(KERN_DEBUG "%s: stopping LH7A404 OHCI USB Controller\n",
": stopping LH7A404 OHCI USB Controller\n"); __FILE__);
CSC_PWRCNT &= ~CSC_PWRCNT_USBH_EN; /* Disable clock */ CSC_PWRCNT &= ~CSC_PWRCNT_USBH_EN; /* Disable clock */
} }
......
...@@ -114,21 +114,21 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) ...@@ -114,21 +114,21 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
hcd->rsrc_len = res.end - res.start + 1; hcd->rsrc_len = res.end - res.start + 1;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
printk(KERN_ERR __FILE__ ": request_mem_region failed\n"); printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
rv = -EBUSY; rv = -EBUSY;
goto err_rmr; goto err_rmr;
} }
irq = irq_of_parse_and_map(dn, 0); irq = irq_of_parse_and_map(dn, 0);
if (irq == NO_IRQ) { if (irq == NO_IRQ) {
printk(KERN_ERR __FILE__ ": irq_of_parse_and_map failed\n"); printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__);
rv = -EBUSY; rv = -EBUSY;
goto err_irq; goto err_irq;
} }
hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
if (!hcd->regs) { if (!hcd->regs) {
printk(KERN_ERR __FILE__ ": ioremap failed\n"); printk(KERN_ERR "%s: ioremap failed\n", __FILE__);
rv = -ENOMEM; rv = -ENOMEM;
goto err_ioremap; goto err_ioremap;
} }
...@@ -169,7 +169,7 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) ...@@ -169,7 +169,7 @@ ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
} else } else
release_mem_region(res.start, 0x4); release_mem_region(res.start, 0x4);
} else } else
pr_debug(__FILE__ ": cannot get ehci offset from fdt\n"); pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__);
} }
iounmap(hcd->regs); iounmap(hcd->regs);
......
...@@ -41,14 +41,14 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver, ...@@ -41,14 +41,14 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) { if (!res) {
pr_debug(__FILE__ ": no irq\n"); pr_debug("%s: no irq\n", __FILE__);
return -ENODEV; return -ENODEV;
} }
irq = res->start; irq = res->start;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) { if (!res) {
pr_debug(__FILE__ ": no reg addr\n"); pr_debug("%s: no reg addr\n", __FILE__);
return -ENODEV; return -ENODEV;
} }
...@@ -59,14 +59,14 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver, ...@@ -59,14 +59,14 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
hcd->rsrc_len = res->end - res->start + 1; hcd->rsrc_len = res->end - res->start + 1;
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
pr_debug(__FILE__ ": request_mem_region failed\n"); pr_debug("%s: request_mem_region failed\n", __FILE__);
retval = -EBUSY; retval = -EBUSY;
goto err1; goto err1;
} }
hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
if (!hcd->regs) { if (!hcd->regs) {
pr_debug(__FILE__ ": ioremap failed\n"); pr_debug("%s: ioremap failed\n", __FILE__);
retval = -ENOMEM; retval = -ENOMEM;
goto err2; goto err2;
} }
......
...@@ -31,8 +31,8 @@ static void sa1111_start_hc(struct sa1111_dev *dev) ...@@ -31,8 +31,8 @@ static void sa1111_start_hc(struct sa1111_dev *dev)
{ {
unsigned int usb_rst = 0; unsigned int usb_rst = 0;
printk(KERN_DEBUG __FILE__ printk(KERN_DEBUG "%s: starting SA-1111 OHCI USB Controller\n",
": starting SA-1111 OHCI USB Controller\n"); __FILE__);
#ifdef CONFIG_SA1100_BADGE4 #ifdef CONFIG_SA1100_BADGE4
if (machine_is_badge4()) { if (machine_is_badge4()) {
...@@ -65,8 +65,8 @@ static void sa1111_start_hc(struct sa1111_dev *dev) ...@@ -65,8 +65,8 @@ static void sa1111_start_hc(struct sa1111_dev *dev)
static void sa1111_stop_hc(struct sa1111_dev *dev) static void sa1111_stop_hc(struct sa1111_dev *dev)
{ {
unsigned int usb_rst; unsigned int usb_rst;
printk(KERN_DEBUG __FILE__ printk(KERN_DEBUG "%s: stopping SA-1111 OHCI USB Controller\n",
": stopping SA-1111 OHCI USB Controller\n"); __FILE__);
/* /*
* Put the USB host controller into reset. * Put the USB host controller into reset.
......
...@@ -38,7 +38,7 @@ static int debug = 1; ...@@ -38,7 +38,7 @@ static int debug = 1;
#define dbg(lvl, format, arg...) \ #define dbg(lvl, format, arg...) \
do { \ do { \
if (debug >= lvl) \ if (debug >= lvl) \
printk(KERN_DEBUG __FILE__ " : " format " \n", ## arg); \ printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \
} while (0) } while (0)
...@@ -132,8 +132,8 @@ static void adu_debug_data(int level, const char *function, int size, ...@@ -132,8 +132,8 @@ static void adu_debug_data(int level, const char *function, int size,
if (debug < level) if (debug < level)
return; return;
printk(KERN_DEBUG __FILE__": %s - length = %d, data = ", printk(KERN_DEBUG "%s: %s - length = %d, data = ",
function, size); __FILE__, function, size);
for (i = 0; i < size; ++i) for (i = 0; i < size; ++i)
printk("%.2x ", data[i]); printk("%.2x ", data[i]);
printk("\n"); printk("\n");
......
...@@ -798,7 +798,7 @@ static int __init ld_usb_init(void) ...@@ -798,7 +798,7 @@ static int __init ld_usb_init(void)
/* register this driver with the USB subsystem */ /* register this driver with the USB subsystem */
retval = usb_register(&ld_usb_driver); retval = usb_register(&ld_usb_driver);
if (retval) if (retval)
err("usb_register failed for the "__FILE__" driver. Error number %d\n", retval); err("usb_register failed for the %s driver. Error number %d\n", __FILE__, retval);
return retval; return retval;
} }
......
...@@ -95,8 +95,11 @@ ...@@ -95,8 +95,11 @@
/* Use our own dbg macro */ /* Use our own dbg macro */
#undef dbg #undef dbg
#define dbg(lvl, format, arg...) do { if (debug >= lvl) printk(KERN_DEBUG __FILE__ ": " format "\n", ## arg); } while (0) #define dbg(lvl, format, arg...) \
do { \
if (debug >= lvl) \
printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \
} while (0)
/* Version Information */ /* Version Information */
#define DRIVER_VERSION "v0.96" #define DRIVER_VERSION "v0.96"
...@@ -302,7 +305,7 @@ static inline void lego_usb_tower_debug_data (int level, const char *function, i ...@@ -302,7 +305,7 @@ static inline void lego_usb_tower_debug_data (int level, const char *function, i
if (debug < level) if (debug < level)
return; return;
printk (KERN_DEBUG __FILE__": %s - length = %d, data = ", function, size); printk (KERN_DEBUG "%s: %s - length = %d, data = ", __FILE__, function, size);
for (i = 0; i < size; ++i) { for (i = 0; i < size; ++i) {
printk ("%.2x ", data[i]); printk ("%.2x ", data[i]);
} }
...@@ -1055,7 +1058,7 @@ static int __init lego_usb_tower_init(void) ...@@ -1055,7 +1058,7 @@ static int __init lego_usb_tower_init(void)
/* register this driver with the USB subsystem */ /* register this driver with the USB subsystem */
result = usb_register(&tower_driver); result = usb_register(&tower_driver);
if (result < 0) { if (result < 0) {
err("usb_register failed for the "__FILE__" driver. Error number %d", result); err("usb_register failed for the %s driver. Error number %d", __FILE__, result);
retval = -1; retval = -1;
goto exit; goto exit;
} }
......
...@@ -218,8 +218,8 @@ static void omninet_read_bulk_callback(struct urb *urb) ...@@ -218,8 +218,8 @@ static void omninet_read_bulk_callback(struct urb *urb)
if (debug && header->oh_xxx != 0x30) { if (debug && header->oh_xxx != 0x30) {
if (urb->actual_length) { if (urb->actual_length) {
printk(KERN_DEBUG __FILE__ printk(KERN_DEBUG "%s: omninet_read %d: ",
": omninet_read %d: ", header->oh_len); __FILE__, header->oh_len);
for (i = 0; i < (header->oh_len + for (i = 0; i < (header->oh_len +
OMNINET_HEADERLEN); i++) OMNINET_HEADERLEN); i++)
printk("%.2x ", data[i]); printk("%.2x ", data[i]);
......
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