@@ -118,7 +118,7 @@ static int r8a66597_clock_enable(struct r8a66597 *r8a66597)
118
118
r8a66597_write (r8a66597 , SCKE , SYSCFG0 );
119
119
tmp = r8a66597_read (r8a66597 , SYSCFG0 );
120
120
if (i ++ > 1000 ) {
121
- err ( " register access fail." );
121
+ printk ( KERN_ERR "r8a66597: register access fail.\n " );
122
122
return - ENXIO ;
123
123
}
124
124
} while ((tmp & SCKE ) != SCKE );
@@ -128,7 +128,7 @@ static int r8a66597_clock_enable(struct r8a66597 *r8a66597)
128
128
r8a66597_write (r8a66597 , USBE , SYSCFG0 );
129
129
tmp = r8a66597_read (r8a66597 , SYSCFG0 );
130
130
if (i ++ > 1000 ) {
131
- err ( " register access fail." );
131
+ printk ( KERN_ERR "r8a66597: register access fail.\n " );
132
132
return - ENXIO ;
133
133
}
134
134
} while ((tmp & USBE ) != USBE );
@@ -141,7 +141,7 @@ static int r8a66597_clock_enable(struct r8a66597 *r8a66597)
141
141
msleep (1 );
142
142
tmp = r8a66597_read (r8a66597 , SYSCFG0 );
143
143
if (i ++ > 500 ) {
144
- err ( " register access fail." );
144
+ printk ( KERN_ERR "r8a66597: register access fail.\n " );
145
145
return - ENXIO ;
146
146
}
147
147
} while ((tmp & SCKE ) != SCKE );
@@ -265,7 +265,7 @@ static void get_port_number(char *devpath, u16 *root_port, u16 *hub_port)
265
265
if (root_port ) {
266
266
* root_port = (devpath [0 ] & 0x0F ) - 1 ;
267
267
if (* root_port >= R8A66597_MAX_ROOT_HUB )
268
- err ( "illegal root port number" );
268
+ printk ( KERN_ERR "r8a66597: Illegal root port number.\n " );
269
269
}
270
270
if (hub_port )
271
271
* hub_port = devpath [2 ] & 0x0F ;
@@ -286,7 +286,7 @@ static u16 get_r8a66597_usb_speed(enum usb_device_speed speed)
286
286
usbspd = HSMODE ;
287
287
break ;
288
288
default :
289
- err ( " unknown speed" );
289
+ printk ( KERN_ERR "r8a66597: unknown speed\n " );
290
290
break ;
291
291
}
292
292
@@ -385,7 +385,7 @@ static u8 alloc_usb_address(struct r8a66597 *r8a66597, struct urb *urb)
385
385
struct r8a66597_device * dev ;
386
386
387
387
if (is_hub_limit (urb -> dev -> devpath )) {
388
- err ( "Externel hub limit reached." );
388
+ dev_err ( & urb -> dev -> dev , "External hub limit reached.\n " );
389
389
return 0 ;
390
390
}
391
391
@@ -406,8 +406,9 @@ static u8 alloc_usb_address(struct r8a66597 *r8a66597, struct urb *urb)
406
406
return addr ;
407
407
}
408
408
409
- err ("cannot communicate with a USB device more than 10.(%x)" ,
410
- r8a66597 -> address_map );
409
+ dev_err (& urb -> dev -> dev ,
410
+ "cannot communicate with a USB device more than 10.(%x)\n" ,
411
+ r8a66597 -> address_map );
411
412
412
413
return 0 ;
413
414
}
@@ -447,7 +448,8 @@ static void r8a66597_reg_wait(struct r8a66597 *r8a66597, unsigned long reg,
447
448
do {
448
449
tmp = r8a66597_read (r8a66597 , reg );
449
450
if (i ++ > 1000000 ) {
450
- err ("register%lx, loop %x is timeout" , reg , loop );
451
+ printk (KERN_ERR "r8a66597: register%lx, loop %x "
452
+ "is timeout\n" , reg , loop );
451
453
break ;
452
454
}
453
455
ndelay (1 );
@@ -675,7 +677,7 @@ static u16 get_empty_pipenum(struct r8a66597 *r8a66597,
675
677
array [i ++ ] = 1 ;
676
678
break ;
677
679
default :
678
- err ( " Illegal type" );
680
+ printk ( KERN_ERR "r8a66597: Illegal type\n " );
679
681
return 0 ;
680
682
}
681
683
@@ -705,7 +707,7 @@ static u16 get_r8a66597_type(__u8 type)
705
707
r8a66597_type = R8A66597_ISO ;
706
708
break ;
707
709
default :
708
- err ( " Illegal type" );
710
+ printk ( KERN_ERR "r8a66597: Illegal type\n " );
709
711
r8a66597_type = 0x0000 ;
710
712
break ;
711
713
}
@@ -724,7 +726,7 @@ static u16 get_bufnum(u16 pipenum)
724
726
else if (check_interrupt (pipenum ))
725
727
bufnum = 4 + (pipenum - 6 );
726
728
else
727
- err ( " Illegal pipenum (%d)" , pipenum );
729
+ printk ( KERN_ERR "r8a66597: Illegal pipenum (%d)\n " , pipenum );
728
730
729
731
return bufnum ;
730
732
}
@@ -740,7 +742,7 @@ static u16 get_buf_bsize(u16 pipenum)
740
742
else if (check_interrupt (pipenum ))
741
743
buf_bsize = 0 ;
742
744
else
743
- err ( " Illegal pipenum (%d)" , pipenum );
745
+ printk ( KERN_ERR "r8a66597: Illegal pipenum (%d)\n " , pipenum );
744
746
745
747
return buf_bsize ;
746
748
}
@@ -1189,7 +1191,7 @@ static int start_transfer(struct r8a66597 *r8a66597, struct r8a66597_td *td)
1189
1191
prepare_status_packet (r8a66597 , td );
1190
1192
break ;
1191
1193
default :
1192
- err ( " invalid type." );
1194
+ printk ( KERN_ERR "r8a66597: invalid type.\n " );
1193
1195
break ;
1194
1196
}
1195
1197
@@ -1297,7 +1299,7 @@ static void packet_read(struct r8a66597 *r8a66597, u16 pipenum)
1297
1299
if (unlikely ((tmp & FRDY ) == 0 )) {
1298
1300
pipe_stop (r8a66597 , td -> pipe );
1299
1301
pipe_irq_disable (r8a66597 , pipenum );
1300
- err ( " in fifo not ready (%d)" , pipenum );
1302
+ printk ( KERN_ERR "r8a66597: in fifo not ready (%d)\n " , pipenum );
1301
1303
finish_request (r8a66597 , td , pipenum , td -> urb , - EPIPE );
1302
1304
return ;
1303
1305
}
@@ -1372,7 +1374,7 @@ static void packet_write(struct r8a66597 *r8a66597, u16 pipenum)
1372
1374
if (unlikely ((tmp & FRDY ) == 0 )) {
1373
1375
pipe_stop (r8a66597 , td -> pipe );
1374
1376
pipe_irq_disable (r8a66597 , pipenum );
1375
- err ( " out write fifo not ready. (%d)" , pipenum );
1377
+ printk ( KERN_ERR "r8a66597: out fifo not ready (%d)\n " , pipenum );
1376
1378
finish_request (r8a66597 , td , pipenum , urb , - EPIPE );
1377
1379
return ;
1378
1380
}
@@ -2007,7 +2009,7 @@ static struct r8a66597_device *get_r8a66597_device(struct r8a66597 *r8a66597,
2007
2009
return dev ;
2008
2010
}
2009
2011
2010
- err ( " get_r8a66597_device fail.(%d)\n" , addr );
2012
+ printk ( KERN_ERR "r8a66597: get_r8a66597_device fail.(%d)\n" , addr );
2011
2013
return NULL ;
2012
2014
}
2013
2015
@@ -2276,22 +2278,23 @@ static int __init r8a66597_probe(struct platform_device *pdev)
2276
2278
2277
2279
if (pdev -> dev .dma_mask ) {
2278
2280
ret = - EINVAL ;
2279
- err ( "dma not support " );
2281
+ dev_err ( & pdev -> dev , "dma not supported\n " );
2280
2282
goto clean_up ;
2281
2283
}
2282
2284
2283
2285
res = platform_get_resource_byname (pdev , IORESOURCE_MEM ,
2284
2286
(char * )hcd_name );
2285
2287
if (!res ) {
2286
2288
ret = - ENODEV ;
2287
- err ( "platform_get_resource_byname error." );
2289
+ dev_err ( & pdev -> dev , "platform_get_resource_byname error.\n " );
2288
2290
goto clean_up ;
2289
2291
}
2290
2292
2291
2293
ires = platform_get_resource (pdev , IORESOURCE_IRQ , 0 );
2292
2294
if (!ires ) {
2293
2295
ret = - ENODEV ;
2294
- err ("platform_get_resource IORESOURCE_IRQ error." );
2296
+ dev_err (& pdev -> dev ,
2297
+ "platform_get_resource IORESOURCE_IRQ error.\n" );
2295
2298
goto clean_up ;
2296
2299
}
2297
2300
@@ -2301,15 +2304,15 @@ static int __init r8a66597_probe(struct platform_device *pdev)
2301
2304
reg = ioremap (res -> start , resource_len (res ));
2302
2305
if (reg == NULL ) {
2303
2306
ret = - ENOMEM ;
2304
- err ( "ioremap error." );
2307
+ dev_err ( & pdev -> dev , "ioremap error.\n " );
2305
2308
goto clean_up ;
2306
2309
}
2307
2310
2308
2311
/* initialize hcd */
2309
2312
hcd = usb_create_hcd (& r8a66597_hc_driver , & pdev -> dev , (char * )hcd_name );
2310
2313
if (!hcd ) {
2311
2314
ret = - ENOMEM ;
2312
- err ( "Failed to create hcd" );
2315
+ dev_err ( & pdev -> dev , "Failed to create hcd\n " );
2313
2316
goto clean_up ;
2314
2317
}
2315
2318
r8a66597 = hcd_to_r8a66597 (hcd );
@@ -2355,12 +2358,12 @@ static int __init r8a66597_probe(struct platform_device *pdev)
2355
2358
}
2356
2359
break ;
2357
2360
default :
2358
- err ( "Unknown irq_sense value." );
2361
+ dev_err ( & pdev -> dev , "Unknown irq_sense value.\n " );
2359
2362
}
2360
2363
2361
2364
ret = usb_add_hcd (hcd , irq , IRQF_DISABLED | irq_trigger );
2362
2365
if (ret != 0 ) {
2363
- err ( "Failed to add hcd" );
2366
+ dev_err ( & pdev -> dev , "Failed to add hcd\n " );
2364
2367
goto clean_up ;
2365
2368
}
2366
2369
0 commit comments