aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYAMANE Toshiaki <yamanetoshi@gmail.com>2012-11-05 05:38:46 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-11-21 10:33:12 -0500
commit792807140e4f91439371a4869cf211ac8e4f182f (patch)
tree4271cf684442670d81c6988512fad728f295c791 /drivers
parent76705fe8e1e173c9512a0fd638a1ed6356890b28 (diff)
[media] staging/media: Use dev_ printks in go7007/go7007-fw.c
fixed below checkpatch warning. - WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ... - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/go7007/go7007-fw.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/drivers/staging/media/go7007/go7007-fw.c b/drivers/staging/media/go7007/go7007-fw.c
index c9a6409edfe3..f99c05b454b0 100644
--- a/drivers/staging/media/go7007/go7007-fw.c
+++ b/drivers/staging/media/go7007/go7007-fw.c
@@ -382,8 +382,8 @@ static int gen_mjpeghdr_to_package(struct go7007 *go, __le16 *code, int space)
382 382
383 buf = kzalloc(4096, GFP_KERNEL); 383 buf = kzalloc(4096, GFP_KERNEL);
384 if (buf == NULL) { 384 if (buf == NULL) {
385 printk(KERN_ERR "go7007: unable to allocate 4096 bytes for " 385 dev_err(go->dev,
386 "firmware construction\n"); 386 "unable to allocate 4096 bytes for firmware construction\n");
387 return -1; 387 return -1;
388 } 388 }
389 389
@@ -652,8 +652,8 @@ static int gen_mpeg1hdr_to_package(struct go7007 *go,
652 652
653 buf = kzalloc(5120, GFP_KERNEL); 653 buf = kzalloc(5120, GFP_KERNEL);
654 if (buf == NULL) { 654 if (buf == NULL) {
655 printk(KERN_ERR "go7007: unable to allocate 5120 bytes for " 655 dev_err(go->dev,
656 "firmware construction\n"); 656 "unable to allocate 5120 bytes for firmware construction\n");
657 return -1; 657 return -1;
658 } 658 }
659 framelen[0] = mpeg1_frame_header(go, buf, 0, 1, PFRAME); 659 framelen[0] = mpeg1_frame_header(go, buf, 0, 1, PFRAME);
@@ -839,8 +839,8 @@ static int gen_mpeg4hdr_to_package(struct go7007 *go,
839 839
840 buf = kzalloc(5120, GFP_KERNEL); 840 buf = kzalloc(5120, GFP_KERNEL);
841 if (buf == NULL) { 841 if (buf == NULL) {
842 printk(KERN_ERR "go7007: unable to allocate 5120 bytes for " 842 dev_err(go->dev,
843 "firmware construction\n"); 843 "unable to allocate 5120 bytes for firmware construction\n");
844 return -1; 844 return -1;
845 } 845 }
846 framelen[0] = mpeg4_frame_header(go, buf, 0, PFRAME); 846 framelen[0] = mpeg4_frame_header(go, buf, 0, PFRAME);
@@ -1545,9 +1545,8 @@ static int do_special(struct go7007 *go, u16 type, __le16 *code, int space,
1545 case SPECIAL_MODET: 1545 case SPECIAL_MODET:
1546 return modet_to_package(go, code, space); 1546 return modet_to_package(go, code, space);
1547 } 1547 }
1548 printk(KERN_ERR 1548 dev_err(go->dev,
1549 "go7007: firmware file contains unsupported feature %04x\n", 1549 "firmware file contains unsupported feature %04x\n", type);
1550 type);
1551 return -1; 1550 return -1;
1552} 1551}
1553 1552
@@ -1577,15 +1576,16 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen)
1577 return -1; 1576 return -1;
1578 } 1577 }
1579 if (request_firmware(&fw_entry, go->board_info->firmware, go->dev)) { 1578 if (request_firmware(&fw_entry, go->board_info->firmware, go->dev)) {
1580 printk(KERN_ERR 1579 dev_err(go->dev,
1581 "go7007: unable to load firmware from file \"%s\"\n", 1580 "unable to load firmware from file \"%s\"\n",
1582 go->board_info->firmware); 1581 go->board_info->firmware);
1583 return -1; 1582 return -1;
1584 } 1583 }
1585 code = kzalloc(codespace * 2, GFP_KERNEL); 1584 code = kzalloc(codespace * 2, GFP_KERNEL);
1586 if (code == NULL) { 1585 if (code == NULL) {
1587 printk(KERN_ERR "go7007: unable to allocate %d bytes for " 1586 dev_err(go->dev,
1588 "firmware construction\n", codespace * 2); 1587 "unable to allocate %d bytes for firmware construction\n",
1588 codespace * 2);
1589 goto fw_failed; 1589 goto fw_failed;
1590 } 1590 }
1591 src = (__le16 *)fw_entry->data; 1591 src = (__le16 *)fw_entry->data;
@@ -1594,9 +1594,9 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen)
1594 chunk_flags = __le16_to_cpu(src[0]); 1594 chunk_flags = __le16_to_cpu(src[0]);
1595 chunk_len = __le16_to_cpu(src[1]); 1595 chunk_len = __le16_to_cpu(src[1]);
1596 if (chunk_len + 2 > srclen) { 1596 if (chunk_len + 2 > srclen) {
1597 printk(KERN_ERR "go7007: firmware file \"%s\" " 1597 dev_err(go->dev,
1598 "appears to be corrupted\n", 1598 "firmware file \"%s\" appears to be corrupted\n",
1599 go->board_info->firmware); 1599 go->board_info->firmware);
1600 goto fw_failed; 1600 goto fw_failed;
1601 } 1601 }
1602 if (chunk_flags & mode_flag) { 1602 if (chunk_flags & mode_flag) {
@@ -1604,17 +1604,15 @@ int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen)
1604 ret = do_special(go, __le16_to_cpu(src[2]), 1604 ret = do_special(go, __le16_to_cpu(src[2]),
1605 &code[i], codespace - i, framelen); 1605 &code[i], codespace - i, framelen);
1606 if (ret < 0) { 1606 if (ret < 0) {
1607 printk(KERN_ERR "go7007: insufficient " 1607 dev_err(go->dev,
1608 "memory for firmware " 1608 "insufficient memory for firmware construction\n");
1609 "construction\n");
1610 goto fw_failed; 1609 goto fw_failed;
1611 } 1610 }
1612 i += ret; 1611 i += ret;
1613 } else { 1612 } else {
1614 if (codespace - i < chunk_len) { 1613 if (codespace - i < chunk_len) {
1615 printk(KERN_ERR "go7007: insufficient " 1614 dev_err(go->dev,
1616 "memory for firmware " 1615 "insufficient memory for firmware construction\n");
1617 "construction\n");
1618 goto fw_failed; 1616 goto fw_failed;
1619 } 1617 }
1620 memcpy(&code[i], &src[2], chunk_len * 2); 1618 memcpy(&code[i], &src[2], chunk_len * 2);