diff options
author | Felipe Balbi <felipe.lima@indt.org.br> | 2007-08-15 10:38:12 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-12 17:55:13 -0400 |
commit | 7b5cd5fefbe023625a7ff7604e8beb9a15a9efab (patch) | |
tree | 8f3e7da59962ae3f2e965de77a9cbfb65c7ecd09 /drivers/usb/misc/sisusbvga | |
parent | ecb8b190bcf49e67a6bd955340ecc07d243b6efa (diff) |
USB: SisUSB2VGA: Convert printk to dev_* macros
This patch convert printk entries to dev_* macros, this provide better
debugging and better readability to the code.
Signed-off-by: Felipe Balbi <felipe.lima@indt.org.br>
Cc: Thomas <thomas@winischhofer.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/sisusbvga')
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb.c | 111 | ||||
-rw-r--r-- | drivers/usb/misc/sisusbvga/sisusb_con.c | 13 |
2 files changed, 36 insertions, 88 deletions
diff --git a/drivers/usb/misc/sisusbvga/sisusb.c b/drivers/usb/misc/sisusbvga/sisusb.c index 558b94fd209d..4d6b89336e63 100644 --- a/drivers/usb/misc/sisusbvga/sisusb.c +++ b/drivers/usb/misc/sisusbvga/sisusb.c | |||
@@ -1003,16 +1003,10 @@ static int sisusb_write_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr, | |||
1003 | if (ret) { | 1003 | if (ret) { |
1004 | msgcount++; | 1004 | msgcount++; |
1005 | if (msgcount < 500) | 1005 | if (msgcount < 500) |
1006 | printk(KERN_ERR | 1006 | dev_err(&sisusb->sisusb_dev->dev, "Wrote %zd of %d bytes, error %d\n", |
1007 | "sisusbvga[%d]: Wrote %zd of " | 1007 | *bytes_written, length, ret); |
1008 | "%d bytes, error %d\n", | ||
1009 | sisusb->minor, *bytes_written, | ||
1010 | length, ret); | ||
1011 | else if (msgcount == 500) | 1008 | else if (msgcount == 500) |
1012 | printk(KERN_ERR | 1009 | dev_err(&sisusb->sisusb_dev->dev, "Too many errors, logging stopped\n"); |
1013 | "sisusbvga[%d]: Too many errors" | ||
1014 | ", logging stopped\n", | ||
1015 | sisusb->minor); | ||
1016 | } | 1010 | } |
1017 | addr += (*bytes_written); | 1011 | addr += (*bytes_written); |
1018 | length -= (*bytes_written); | 1012 | length -= (*bytes_written); |
@@ -1389,10 +1383,10 @@ sisusb_testreadwrite(struct sisusb_usb_data *sisusb) | |||
1389 | sisusb_copy_memory(sisusb, srcbuffer, sisusb->vrambase, 7, &dummy); | 1383 | sisusb_copy_memory(sisusb, srcbuffer, sisusb->vrambase, 7, &dummy); |
1390 | 1384 | ||
1391 | for(i = 1; i <= 7; i++) { | 1385 | for(i = 1; i <= 7; i++) { |
1392 | printk(KERN_DEBUG "sisusb: rwtest %d bytes\n", i); | 1386 | dev_dbg(&sisusb->sisusb_dev->dev, "sisusb: rwtest %d bytes\n", i); |
1393 | sisusb_read_memory(sisusb, destbuffer, sisusb->vrambase, i, &dummy); | 1387 | sisusb_read_memory(sisusb, destbuffer, sisusb->vrambase, i, &dummy); |
1394 | for(j = 0; j < i; j++) { | 1388 | for(j = 0; j < i; j++) { |
1395 | printk(KERN_DEBUG "sisusb: rwtest read[%d] = %x\n", j, destbuffer[j]); | 1389 | dev_dbg(&sisusb->sisusb_dev->dev, "rwtest read[%d] = %x\n", j, destbuffer[j]); |
1396 | } | 1390 | } |
1397 | } | 1391 | } |
1398 | } | 1392 | } |
@@ -2111,17 +2105,12 @@ sisusb_init_gfxcore(struct sisusb_usb_data *sisusb) | |||
2111 | if (ramtype <= 1) { | 2105 | if (ramtype <= 1) { |
2112 | ret |= sisusb_get_sdram_size(sisusb, &iret, bw, chab); | 2106 | ret |= sisusb_get_sdram_size(sisusb, &iret, bw, chab); |
2113 | if (iret) { | 2107 | if (iret) { |
2114 | printk(KERN_ERR "sisusbvga[%d]: RAM size " | 2108 | dev_err(&sisusb->sisusb_dev->dev,"RAM size detection failed, assuming 8MB video RAM\n"); |
2115 | "detection failed, " | ||
2116 | "assuming 8MB video RAM\n", | ||
2117 | sisusb->minor); | ||
2118 | ret |= SETIREG(SISSR,0x14,0x31); | 2109 | ret |= SETIREG(SISSR,0x14,0x31); |
2119 | /* TODO */ | 2110 | /* TODO */ |
2120 | } | 2111 | } |
2121 | } else { | 2112 | } else { |
2122 | printk(KERN_ERR "sisusbvga[%d]: DDR RAM device found, " | 2113 | dev_err(&sisusb->sisusb_dev->dev, "DDR RAM device found, assuming 8MB video RAM\n"); |
2123 | "assuming 8MB video RAM\n", | ||
2124 | sisusb->minor); | ||
2125 | ret |= SETIREG(SISSR,0x14,0x31); | 2114 | ret |= SETIREG(SISSR,0x14,0x31); |
2126 | /* *** TODO *** */ | 2115 | /* *** TODO *** */ |
2127 | } | 2116 | } |
@@ -2192,8 +2181,7 @@ sisusb_get_ramconfig(struct sisusb_usb_data *sisusb) | |||
2192 | break; | 2181 | break; |
2193 | } | 2182 | } |
2194 | 2183 | ||
2195 | printk(KERN_INFO "sisusbvga[%d]: %dMB %s %s, bus width %d\n", | 2184 | dev_info(&sisusb->sisusb_dev->dev, "%dMB %s %s, bus width %d\n", (sisusb->vramsize >> 20), ramtypetext1, |
2196 | sisusb->minor, (sisusb->vramsize >> 20), ramtypetext1, | ||
2197 | ramtypetext2[ramtype], bw); | 2185 | ramtypetext2[ramtype], bw); |
2198 | } | 2186 | } |
2199 | 2187 | ||
@@ -2453,8 +2441,7 @@ sisusb_open(struct inode *inode, struct file *file) | |||
2453 | int subminor = iminor(inode); | 2441 | int subminor = iminor(inode); |
2454 | 2442 | ||
2455 | if (!(interface = usb_find_interface(&sisusb_driver, subminor))) { | 2443 | if (!(interface = usb_find_interface(&sisusb_driver, subminor))) { |
2456 | printk(KERN_ERR "sisusb[%d]: Failed to find interface\n", | 2444 | dev_err(&sisusb->sisusb_dev->dev, "Failed to find interface\n"); |
2457 | subminor); | ||
2458 | return -ENODEV; | 2445 | return -ENODEV; |
2459 | } | 2446 | } |
2460 | 2447 | ||
@@ -2477,18 +2464,12 @@ sisusb_open(struct inode *inode, struct file *file) | |||
2477 | if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH) { | 2464 | if (sisusb->sisusb_dev->speed == USB_SPEED_HIGH) { |
2478 | if (sisusb_init_gfxdevice(sisusb, 0)) { | 2465 | if (sisusb_init_gfxdevice(sisusb, 0)) { |
2479 | mutex_unlock(&sisusb->lock); | 2466 | mutex_unlock(&sisusb->lock); |
2480 | printk(KERN_ERR | 2467 | dev_err(&sisusb->sisusb_dev->dev, "Failed to initialize device\n"); |
2481 | "sisusbvga[%d]: Failed to initialize " | ||
2482 | "device\n", | ||
2483 | sisusb->minor); | ||
2484 | return -EIO; | 2468 | return -EIO; |
2485 | } | 2469 | } |
2486 | } else { | 2470 | } else { |
2487 | mutex_unlock(&sisusb->lock); | 2471 | mutex_unlock(&sisusb->lock); |
2488 | printk(KERN_ERR | 2472 | dev_err(&sisusb->sisusb_dev->dev, "Device not attached to USB 2.0 hub\n"); |
2489 | "sisusbvga[%d]: Device not attached to " | ||
2490 | "USB 2.0 hub\n", | ||
2491 | sisusb->minor); | ||
2492 | return -EIO; | 2473 | return -EIO; |
2493 | } | 2474 | } |
2494 | } | 2475 | } |
@@ -2529,7 +2510,6 @@ static int | |||
2529 | sisusb_release(struct inode *inode, struct file *file) | 2510 | sisusb_release(struct inode *inode, struct file *file) |
2530 | { | 2511 | { |
2531 | struct sisusb_usb_data *sisusb; | 2512 | struct sisusb_usb_data *sisusb; |
2532 | int myminor; | ||
2533 | 2513 | ||
2534 | if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) | 2514 | if (!(sisusb = (struct sisusb_usb_data *)file->private_data)) |
2535 | return -ENODEV; | 2515 | return -ENODEV; |
@@ -2542,8 +2522,6 @@ sisusb_release(struct inode *inode, struct file *file) | |||
2542 | sisusb_kill_all_busy(sisusb); | 2522 | sisusb_kill_all_busy(sisusb); |
2543 | } | 2523 | } |
2544 | 2524 | ||
2545 | myminor = sisusb->minor; | ||
2546 | |||
2547 | sisusb->isopen = 0; | 2525 | sisusb->isopen = 0; |
2548 | file->private_data = NULL; | 2526 | file->private_data = NULL; |
2549 | 2527 | ||
@@ -3126,17 +3104,13 @@ static int sisusb_probe(struct usb_interface *intf, | |||
3126 | struct usb_device *dev = interface_to_usbdev(intf); | 3104 | struct usb_device *dev = interface_to_usbdev(intf); |
3127 | struct sisusb_usb_data *sisusb; | 3105 | struct sisusb_usb_data *sisusb; |
3128 | int retval = 0, i; | 3106 | int retval = 0, i; |
3129 | const char *memfail = | ||
3130 | KERN_ERR | ||
3131 | "sisusbvga[%d]: Failed to allocate memory for %s buffer\n"; | ||
3132 | 3107 | ||
3133 | printk(KERN_INFO "sisusb: USB2VGA dongle found at address %d\n", | 3108 | dev_info(&dev->dev, "USB2VGA dongle found at address %d\n", |
3134 | dev->devnum); | 3109 | dev->devnum); |
3135 | 3110 | ||
3136 | /* Allocate memory for our private */ | 3111 | /* Allocate memory for our private */ |
3137 | if (!(sisusb = kzalloc(sizeof(*sisusb), GFP_KERNEL))) { | 3112 | if (!(sisusb = kzalloc(sizeof(*sisusb), GFP_KERNEL))) { |
3138 | printk(KERN_ERR | 3113 | dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate memory for private data\n"); |
3139 | "sisusb: Failed to allocate memory for private data\n"); | ||
3140 | return -ENOMEM; | 3114 | return -ENOMEM; |
3141 | } | 3115 | } |
3142 | kref_init(&sisusb->kref); | 3116 | kref_init(&sisusb->kref); |
@@ -3145,8 +3119,7 @@ static int sisusb_probe(struct usb_interface *intf, | |||
3145 | 3119 | ||
3146 | /* Register device */ | 3120 | /* Register device */ |
3147 | if ((retval = usb_register_dev(intf, &usb_sisusb_class))) { | 3121 | if ((retval = usb_register_dev(intf, &usb_sisusb_class))) { |
3148 | printk(KERN_ERR | 3122 | dev_err(&sisusb->sisusb_dev->dev, "Failed to get a minor for device %d\n", |
3149 | "sisusb: Failed to get a minor for device %d\n", | ||
3150 | dev->devnum); | 3123 | dev->devnum); |
3151 | retval = -ENODEV; | 3124 | retval = -ENODEV; |
3152 | goto error_1; | 3125 | goto error_1; |
@@ -3164,7 +3137,7 @@ static int sisusb_probe(struct usb_interface *intf, | |||
3164 | sisusb->ibufsize = SISUSB_IBUF_SIZE; | 3137 | sisusb->ibufsize = SISUSB_IBUF_SIZE; |
3165 | if (!(sisusb->ibuf = usb_buffer_alloc(dev, SISUSB_IBUF_SIZE, | 3138 | if (!(sisusb->ibuf = usb_buffer_alloc(dev, SISUSB_IBUF_SIZE, |
3166 | GFP_KERNEL, &sisusb->transfer_dma_in))) { | 3139 | GFP_KERNEL, &sisusb->transfer_dma_in))) { |
3167 | printk(memfail, "input", sisusb->minor); | 3140 | dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate memory for input buffer"); |
3168 | retval = -ENOMEM; | 3141 | retval = -ENOMEM; |
3169 | goto error_2; | 3142 | goto error_2; |
3170 | } | 3143 | } |
@@ -3176,7 +3149,7 @@ static int sisusb_probe(struct usb_interface *intf, | |||
3176 | GFP_KERNEL, | 3149 | GFP_KERNEL, |
3177 | &sisusb->transfer_dma_out[i]))) { | 3150 | &sisusb->transfer_dma_out[i]))) { |
3178 | if (i == 0) { | 3151 | if (i == 0) { |
3179 | printk(memfail, "output", sisusb->minor); | 3152 | dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate memory for output buffer\n"); |
3180 | retval = -ENOMEM; | 3153 | retval = -ENOMEM; |
3181 | goto error_3; | 3154 | goto error_3; |
3182 | } | 3155 | } |
@@ -3188,9 +3161,7 @@ static int sisusb_probe(struct usb_interface *intf, | |||
3188 | 3161 | ||
3189 | /* Allocate URBs */ | 3162 | /* Allocate URBs */ |
3190 | if (!(sisusb->sisurbin = usb_alloc_urb(0, GFP_KERNEL))) { | 3163 | if (!(sisusb->sisurbin = usb_alloc_urb(0, GFP_KERNEL))) { |
3191 | printk(KERN_ERR | 3164 | dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate URBs\n"); |
3192 | "sisusbvga[%d]: Failed to allocate URBs\n", | ||
3193 | sisusb->minor); | ||
3194 | retval = -ENOMEM; | 3165 | retval = -ENOMEM; |
3195 | goto error_3; | 3166 | goto error_3; |
3196 | } | 3167 | } |
@@ -3198,9 +3169,7 @@ static int sisusb_probe(struct usb_interface *intf, | |||
3198 | 3169 | ||
3199 | for (i = 0; i < sisusb->numobufs; i++) { | 3170 | for (i = 0; i < sisusb->numobufs; i++) { |
3200 | if (!(sisusb->sisurbout[i] = usb_alloc_urb(0, GFP_KERNEL))) { | 3171 | if (!(sisusb->sisurbout[i] = usb_alloc_urb(0, GFP_KERNEL))) { |
3201 | printk(KERN_ERR | 3172 | dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate URBs\n"); |
3202 | "sisusbvga[%d]: Failed to allocate URBs\n", | ||
3203 | sisusb->minor); | ||
3204 | retval = -ENOMEM; | 3173 | retval = -ENOMEM; |
3205 | goto error_4; | 3174 | goto error_4; |
3206 | } | 3175 | } |
@@ -3209,15 +3178,12 @@ static int sisusb_probe(struct usb_interface *intf, | |||
3209 | sisusb->urbstatus[i] = 0; | 3178 | sisusb->urbstatus[i] = 0; |
3210 | } | 3179 | } |
3211 | 3180 | ||
3212 | printk(KERN_INFO "sisusbvga[%d]: Allocated %d output buffers\n", | 3181 | dev_info(&sisusb->sisusb_dev->dev, "Allocated %d output buffers\n", sisusb->numobufs); |
3213 | sisusb->minor, sisusb->numobufs); | ||
3214 | 3182 | ||
3215 | #ifdef INCL_SISUSB_CON | 3183 | #ifdef INCL_SISUSB_CON |
3216 | /* Allocate our SiS_Pr */ | 3184 | /* Allocate our SiS_Pr */ |
3217 | if (!(sisusb->SiS_Pr = kmalloc(sizeof(struct SiS_Private), GFP_KERNEL))) { | 3185 | if (!(sisusb->SiS_Pr = kmalloc(sizeof(struct SiS_Private), GFP_KERNEL))) { |
3218 | printk(KERN_ERR | 3186 | dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate SiS_Pr\n"); |
3219 | "sisusbvga[%d]: Failed to allocate SiS_Pr\n", | ||
3220 | sisusb->minor); | ||
3221 | } | 3187 | } |
3222 | #endif | 3188 | #endif |
3223 | 3189 | ||
@@ -3239,10 +3205,7 @@ static int sisusb_probe(struct usb_interface *intf, | |||
3239 | ret |= register_ioctl32_conversion(SISUSB_GET_CONFIG, NULL); | 3205 | ret |= register_ioctl32_conversion(SISUSB_GET_CONFIG, NULL); |
3240 | ret |= register_ioctl32_conversion(SISUSB_COMMAND, NULL); | 3206 | ret |= register_ioctl32_conversion(SISUSB_COMMAND, NULL); |
3241 | if (ret) | 3207 | if (ret) |
3242 | printk(KERN_ERR | 3208 | dev_err(&sisusb->sisusb_dev->dev, "Error registering ioctl32 translations\n"); |
3243 | "sisusbvga[%d]: Error registering ioctl32 " | ||
3244 | "translations\n", | ||
3245 | sisusb->minor); | ||
3246 | else | 3209 | else |
3247 | sisusb->ioctl32registered = 1; | 3210 | sisusb->ioctl32registered = 1; |
3248 | } | 3211 | } |
@@ -3258,23 +3221,17 @@ static int sisusb_probe(struct usb_interface *intf, | |||
3258 | initscreen = 0; | 3221 | initscreen = 0; |
3259 | #endif | 3222 | #endif |
3260 | if (sisusb_init_gfxdevice(sisusb, initscreen)) | 3223 | if (sisusb_init_gfxdevice(sisusb, initscreen)) |
3261 | printk(KERN_ERR | 3224 | dev_err(&sisusb->sisusb_dev->dev, "Failed to early initialize device\n"); |
3262 | "sisusbvga[%d]: Failed to early " | ||
3263 | "initialize device\n", | ||
3264 | sisusb->minor); | ||
3265 | 3225 | ||
3266 | } else | 3226 | } else |
3267 | printk(KERN_INFO | 3227 | dev_info(&sisusb->sisusb_dev->dev, "Not attached to USB 2.0 hub, deferring init\n"); |
3268 | "sisusbvga[%d]: Not attached to USB 2.0 hub, " | ||
3269 | "deferring init\n", | ||
3270 | sisusb->minor); | ||
3271 | 3228 | ||
3272 | sisusb->ready = 1; | 3229 | sisusb->ready = 1; |
3273 | 3230 | ||
3274 | #ifdef SISUSBENDIANTEST | 3231 | #ifdef SISUSBENDIANTEST |
3275 | printk(KERN_DEBUG "sisusb: *** RWTEST ***\n"); | 3232 | dev_dbg(&sisusb->sisusb_dev->dev, "*** RWTEST ***\n"); |
3276 | sisusb_testreadwrite(sisusb); | 3233 | sisusb_testreadwrite(sisusb); |
3277 | printk(KERN_DEBUG "sisusb: *** RWTEST END ***\n"); | 3234 | dev_dbg(&sisusb->sisusb_dev->dev, "*** RWTEST END ***\n"); |
3278 | #endif | 3235 | #endif |
3279 | 3236 | ||
3280 | #ifdef INCL_SISUSB_CON | 3237 | #ifdef INCL_SISUSB_CON |
@@ -3297,7 +3254,6 @@ error_1: | |||
3297 | static void sisusb_disconnect(struct usb_interface *intf) | 3254 | static void sisusb_disconnect(struct usb_interface *intf) |
3298 | { | 3255 | { |
3299 | struct sisusb_usb_data *sisusb; | 3256 | struct sisusb_usb_data *sisusb; |
3300 | int minor; | ||
3301 | 3257 | ||
3302 | /* This should *not* happen */ | 3258 | /* This should *not* happen */ |
3303 | if (!(sisusb = usb_get_intfdata(intf))) | 3259 | if (!(sisusb = usb_get_intfdata(intf))) |
@@ -3307,8 +3263,6 @@ static void sisusb_disconnect(struct usb_interface *intf) | |||
3307 | sisusb_console_exit(sisusb); | 3263 | sisusb_console_exit(sisusb); |
3308 | #endif | 3264 | #endif |
3309 | 3265 | ||
3310 | minor = sisusb->minor; | ||
3311 | |||
3312 | usb_deregister_dev(intf, &usb_sisusb_class); | 3266 | usb_deregister_dev(intf, &usb_sisusb_class); |
3313 | 3267 | ||
3314 | mutex_lock(&sisusb->lock); | 3268 | mutex_lock(&sisusb->lock); |
@@ -3327,10 +3281,7 @@ static void sisusb_disconnect(struct usb_interface *intf) | |||
3327 | ret |= unregister_ioctl32_conversion(SISUSB_GET_CONFIG); | 3281 | ret |= unregister_ioctl32_conversion(SISUSB_GET_CONFIG); |
3328 | ret |= unregister_ioctl32_conversion(SISUSB_COMMAND); | 3282 | ret |= unregister_ioctl32_conversion(SISUSB_COMMAND); |
3329 | if (ret) { | 3283 | if (ret) { |
3330 | printk(KERN_ERR | 3284 | dev_err(&sisusb->sisusb_dev->dev, "Error unregistering ioctl32 translations\n"); |
3331 | "sisusbvga[%d]: Error unregistering " | ||
3332 | "ioctl32 translations\n", | ||
3333 | minor); | ||
3334 | } | 3285 | } |
3335 | } | 3286 | } |
3336 | #endif | 3287 | #endif |
@@ -3343,7 +3294,7 @@ static void sisusb_disconnect(struct usb_interface *intf) | |||
3343 | /* decrement our usage count */ | 3294 | /* decrement our usage count */ |
3344 | kref_put(&sisusb->kref, sisusb_delete); | 3295 | kref_put(&sisusb->kref, sisusb_delete); |
3345 | 3296 | ||
3346 | printk(KERN_INFO "sisusbvga[%d]: Disconnected\n", minor); | 3297 | dev_info(&sisusb->sisusb_dev->dev, "Disconnected\n"); |
3347 | } | 3298 | } |
3348 | 3299 | ||
3349 | static struct usb_device_id sisusb_table [] = { | 3300 | static struct usb_device_id sisusb_table [] = { |
@@ -3368,6 +3319,7 @@ static struct usb_driver sisusb_driver = { | |||
3368 | static int __init usb_sisusb_init(void) | 3319 | static int __init usb_sisusb_init(void) |
3369 | { | 3320 | { |
3370 | int retval; | 3321 | int retval; |
3322 | struct sisusb_usb_data *sisusb; | ||
3371 | 3323 | ||
3372 | #ifdef INCL_SISUSB_CON | 3324 | #ifdef INCL_SISUSB_CON |
3373 | sisusb_init_concode(); | 3325 | sisusb_init_concode(); |
@@ -3375,10 +3327,9 @@ static int __init usb_sisusb_init(void) | |||
3375 | 3327 | ||
3376 | if (!(retval = usb_register(&sisusb_driver))) { | 3328 | if (!(retval = usb_register(&sisusb_driver))) { |
3377 | 3329 | ||
3378 | printk(KERN_INFO "sisusb: Driver version %d.%d.%d\n", | 3330 | dev_info(&sisusb->sisusb_dev->dev, "Driver version %d.%d.%d\n", SISUSB_VERSION, |
3379 | SISUSB_VERSION, SISUSB_REVISION, SISUSB_PATCHLEVEL); | 3331 | SISUSB_REVISION, SISUSB_PATCHLEVEL); |
3380 | printk(KERN_INFO | 3332 | dev_info(&sisusb->sisusb_dev->dev, "sisusb: Copyright (C) 2005 Thomas Winischhofer\n"); |
3381 | "sisusb: Copyright (C) 2005 Thomas Winischhofer\n"); | ||
3382 | 3333 | ||
3383 | } | 3334 | } |
3384 | 3335 | ||
diff --git a/drivers/usb/misc/sisusbvga/sisusb_con.c b/drivers/usb/misc/sisusbvga/sisusb_con.c index 20938cd09ed4..43722e5a49d1 100644 --- a/drivers/usb/misc/sisusbvga/sisusb_con.c +++ b/drivers/usb/misc/sisusbvga/sisusb_con.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <linux/kernel.h> | 52 | #include <linux/kernel.h> |
53 | #include <linux/signal.h> | 53 | #include <linux/signal.h> |
54 | #include <linux/fs.h> | 54 | #include <linux/fs.h> |
55 | #include <linux/usb.h> | ||
55 | #include <linux/tty.h> | 56 | #include <linux/tty.h> |
56 | #include <linux/console.h> | 57 | #include <linux/console.h> |
57 | #include <linux/string.h> | 58 | #include <linux/string.h> |
@@ -537,7 +538,7 @@ sisusbcon_switch(struct vc_data *c) | |||
537 | */ | 538 | */ |
538 | if (c->vc_origin == (unsigned long)c->vc_screenbuf) { | 539 | if (c->vc_origin == (unsigned long)c->vc_screenbuf) { |
539 | mutex_unlock(&sisusb->lock); | 540 | mutex_unlock(&sisusb->lock); |
540 | printk(KERN_DEBUG "sisusb: ASSERT ORIGIN != SCREENBUF!\n"); | 541 | dev_dbg(&sisusb->sisusb_dev->dev, "ASSERT ORIGIN != SCREENBUF!\n"); |
541 | return 0; | 542 | return 0; |
542 | } | 543 | } |
543 | 544 | ||
@@ -1428,7 +1429,7 @@ static const struct consw sisusb_dummy_con = { | |||
1428 | int | 1429 | int |
1429 | sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) | 1430 | sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) |
1430 | { | 1431 | { |
1431 | int i, ret, minor = sisusb->minor; | 1432 | int i, ret; |
1432 | 1433 | ||
1433 | mutex_lock(&sisusb->lock); | 1434 | mutex_lock(&sisusb->lock); |
1434 | 1435 | ||
@@ -1461,9 +1462,7 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) | |||
1461 | /* Set up text mode (and upload default font) */ | 1462 | /* Set up text mode (and upload default font) */ |
1462 | if (sisusb_reset_text_mode(sisusb, 1)) { | 1463 | if (sisusb_reset_text_mode(sisusb, 1)) { |
1463 | mutex_unlock(&sisusb->lock); | 1464 | mutex_unlock(&sisusb->lock); |
1464 | printk(KERN_ERR | 1465 | dev_err(&sisusb->sisusb_dev->dev, "Failed to set up text mode\n"); |
1465 | "sisusbvga[%d]: Failed to set up text mode\n", | ||
1466 | minor); | ||
1467 | return 1; | 1466 | return 1; |
1468 | } | 1467 | } |
1469 | 1468 | ||
@@ -1484,9 +1483,7 @@ sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last) | |||
1484 | /* Allocate screen buffer */ | 1483 | /* Allocate screen buffer */ |
1485 | if (!(sisusb->scrbuf = (unsigned long)vmalloc(sisusb->scrbuf_size))) { | 1484 | if (!(sisusb->scrbuf = (unsigned long)vmalloc(sisusb->scrbuf_size))) { |
1486 | mutex_unlock(&sisusb->lock); | 1485 | mutex_unlock(&sisusb->lock); |
1487 | printk(KERN_ERR | 1486 | dev_err(&sisusb->sisusb_dev->dev, "Failed to allocate screen buffer\n"); |
1488 | "sisusbvga[%d]: Failed to allocate screen buffer\n", | ||
1489 | minor); | ||
1490 | return 1; | 1487 | return 1; |
1491 | } | 1488 | } |
1492 | 1489 | ||