diff options
author | Joe Perches <joe@perches.com> | 2011-08-21 18:56:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-04 10:06:05 -0400 |
commit | 133a9fe949862d9ed8411fb423739f4cee08232d (patch) | |
tree | 4a465a6823412503b73ef0462e3ffad3415fab39 /drivers/media/video/gspca/sn9c2028.c | |
parent | 42f4e774a30d0e9894741b62af4174c73ecc53da (diff) |
[media] gspca: Use current logging styles
Add pr_fmt.
Convert usb style logging macros to pr_<level>.
Remove now unused old usb style logging macros.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/sn9c2028.c')
-rw-r--r-- | drivers/media/video/gspca/sn9c2028.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/media/video/gspca/sn9c2028.c b/drivers/media/video/gspca/sn9c2028.c index 4271f86dfe01..48aae3926a33 100644 --- a/drivers/media/video/gspca/sn9c2028.c +++ b/drivers/media/video/gspca/sn9c2028.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #define MODULE_NAME "sn9c2028" | 23 | #define MODULE_NAME "sn9c2028" |
22 | 24 | ||
23 | #include "gspca.h" | 25 | #include "gspca.h" |
@@ -75,8 +77,8 @@ static int sn9c2028_command(struct gspca_dev *gspca_dev, u8 *command) | |||
75 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 77 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
76 | 2, 0, gspca_dev->usb_buf, 6, 500); | 78 | 2, 0, gspca_dev->usb_buf, 6, 500); |
77 | if (rc < 0) { | 79 | if (rc < 0) { |
78 | err("command write [%02x] error %d", | 80 | pr_err("command write [%02x] error %d\n", |
79 | gspca_dev->usb_buf[0], rc); | 81 | gspca_dev->usb_buf[0], rc); |
80 | return rc; | 82 | return rc; |
81 | } | 83 | } |
82 | 84 | ||
@@ -93,7 +95,7 @@ static int sn9c2028_read1(struct gspca_dev *gspca_dev) | |||
93 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 95 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
94 | 1, 0, gspca_dev->usb_buf, 1, 500); | 96 | 1, 0, gspca_dev->usb_buf, 1, 500); |
95 | if (rc != 1) { | 97 | if (rc != 1) { |
96 | err("read1 error %d", rc); | 98 | pr_err("read1 error %d\n", rc); |
97 | return (rc < 0) ? rc : -EIO; | 99 | return (rc < 0) ? rc : -EIO; |
98 | } | 100 | } |
99 | PDEBUG(D_USBI, "read1 response %02x", gspca_dev->usb_buf[0]); | 101 | PDEBUG(D_USBI, "read1 response %02x", gspca_dev->usb_buf[0]); |
@@ -109,7 +111,7 @@ static int sn9c2028_read4(struct gspca_dev *gspca_dev, u8 *reading) | |||
109 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, | 111 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, |
110 | 4, 0, gspca_dev->usb_buf, 4, 500); | 112 | 4, 0, gspca_dev->usb_buf, 4, 500); |
111 | if (rc != 4) { | 113 | if (rc != 4) { |
112 | err("read4 error %d", rc); | 114 | pr_err("read4 error %d\n", rc); |
113 | return (rc < 0) ? rc : -EIO; | 115 | return (rc < 0) ? rc : -EIO; |
114 | } | 116 | } |
115 | memcpy(reading, gspca_dev->usb_buf, 4); | 117 | memcpy(reading, gspca_dev->usb_buf, 4); |
@@ -131,7 +133,7 @@ static int sn9c2028_long_command(struct gspca_dev *gspca_dev, u8 *command) | |||
131 | for (i = 0; i < 256 && status < 2; i++) | 133 | for (i = 0; i < 256 && status < 2; i++) |
132 | status = sn9c2028_read1(gspca_dev); | 134 | status = sn9c2028_read1(gspca_dev); |
133 | if (status != 2) { | 135 | if (status != 2) { |
134 | err("long command status read error %d", status); | 136 | pr_err("long command status read error %d\n", status); |
135 | return (status < 0) ? status : -EIO; | 137 | return (status < 0) ? status : -EIO; |
136 | } | 138 | } |
137 | 139 | ||
@@ -638,7 +640,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
638 | err_code = start_vivitar_cam(gspca_dev); | 640 | err_code = start_vivitar_cam(gspca_dev); |
639 | break; | 641 | break; |
640 | default: | 642 | default: |
641 | err("Starting unknown camera, please report this"); | 643 | pr_err("Starting unknown camera, please report this\n"); |
642 | return -ENXIO; | 644 | return -ENXIO; |
643 | } | 645 | } |
644 | 646 | ||