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/sonixj.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/sonixj.c')
-rw-r--r-- | drivers/media/video/gspca/sonixj.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 2ad757dc2e1c..816008fe5bfa 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
23 | |||
22 | #define MODULE_NAME "sonixj" | 24 | #define MODULE_NAME "sonixj" |
23 | 25 | ||
24 | #include <linux/input.h> | 26 | #include <linux/input.h> |
@@ -1395,7 +1397,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
1395 | return; | 1397 | return; |
1396 | #ifdef GSPCA_DEBUG | 1398 | #ifdef GSPCA_DEBUG |
1397 | if (len > USB_BUF_SZ) { | 1399 | if (len > USB_BUF_SZ) { |
1398 | err("reg_r: buffer overflow"); | 1400 | pr_err("reg_r: buffer overflow\n"); |
1399 | return; | 1401 | return; |
1400 | } | 1402 | } |
1401 | #endif | 1403 | #endif |
@@ -1408,7 +1410,7 @@ static void reg_r(struct gspca_dev *gspca_dev, | |||
1408 | 500); | 1410 | 500); |
1409 | PDEBUG(D_USBI, "reg_r [%02x] -> %02x", value, gspca_dev->usb_buf[0]); | 1411 | PDEBUG(D_USBI, "reg_r [%02x] -> %02x", value, gspca_dev->usb_buf[0]); |
1410 | if (ret < 0) { | 1412 | if (ret < 0) { |
1411 | err("reg_r err %d", ret); | 1413 | pr_err("reg_r err %d\n", ret); |
1412 | gspca_dev->usb_err = ret; | 1414 | gspca_dev->usb_err = ret; |
1413 | } | 1415 | } |
1414 | } | 1416 | } |
@@ -1432,7 +1434,7 @@ static void reg_w1(struct gspca_dev *gspca_dev, | |||
1432 | gspca_dev->usb_buf, 1, | 1434 | gspca_dev->usb_buf, 1, |
1433 | 500); | 1435 | 500); |
1434 | if (ret < 0) { | 1436 | if (ret < 0) { |
1435 | err("reg_w1 err %d", ret); | 1437 | pr_err("reg_w1 err %d\n", ret); |
1436 | gspca_dev->usb_err = ret; | 1438 | gspca_dev->usb_err = ret; |
1437 | } | 1439 | } |
1438 | } | 1440 | } |
@@ -1449,7 +1451,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
1449 | value, buffer[0], buffer[1]); | 1451 | value, buffer[0], buffer[1]); |
1450 | #ifdef GSPCA_DEBUG | 1452 | #ifdef GSPCA_DEBUG |
1451 | if (len > USB_BUF_SZ) { | 1453 | if (len > USB_BUF_SZ) { |
1452 | err("reg_w: buffer overflow"); | 1454 | pr_err("reg_w: buffer overflow\n"); |
1453 | return; | 1455 | return; |
1454 | } | 1456 | } |
1455 | #endif | 1457 | #endif |
@@ -1462,7 +1464,7 @@ static void reg_w(struct gspca_dev *gspca_dev, | |||
1462 | gspca_dev->usb_buf, len, | 1464 | gspca_dev->usb_buf, len, |
1463 | 500); | 1465 | 500); |
1464 | if (ret < 0) { | 1466 | if (ret < 0) { |
1465 | err("reg_w err %d", ret); | 1467 | pr_err("reg_w err %d\n", ret); |
1466 | gspca_dev->usb_err = ret; | 1468 | gspca_dev->usb_err = ret; |
1467 | } | 1469 | } |
1468 | } | 1470 | } |
@@ -1502,7 +1504,7 @@ static void i2c_w1(struct gspca_dev *gspca_dev, u8 reg, u8 val) | |||
1502 | gspca_dev->usb_buf, 8, | 1504 | gspca_dev->usb_buf, 8, |
1503 | 500); | 1505 | 500); |
1504 | if (ret < 0) { | 1506 | if (ret < 0) { |
1505 | err("i2c_w1 err %d", ret); | 1507 | pr_err("i2c_w1 err %d\n", ret); |
1506 | gspca_dev->usb_err = ret; | 1508 | gspca_dev->usb_err = ret; |
1507 | } | 1509 | } |
1508 | } | 1510 | } |
@@ -1527,7 +1529,7 @@ static void i2c_w8(struct gspca_dev *gspca_dev, | |||
1527 | 500); | 1529 | 500); |
1528 | msleep(2); | 1530 | msleep(2); |
1529 | if (ret < 0) { | 1531 | if (ret < 0) { |
1530 | err("i2c_w8 err %d", ret); | 1532 | pr_err("i2c_w8 err %d\n", ret); |
1531 | gspca_dev->usb_err = ret; | 1533 | gspca_dev->usb_err = ret; |
1532 | } | 1534 | } |
1533 | } | 1535 | } |
@@ -1591,7 +1593,7 @@ static void hv7131r_probe(struct gspca_dev *gspca_dev) | |||
1591 | PDEBUG(D_PROBE, "Sensor HV7131R found"); | 1593 | PDEBUG(D_PROBE, "Sensor HV7131R found"); |
1592 | return; | 1594 | return; |
1593 | } | 1595 | } |
1594 | warn("Erroneous HV7131R ID 0x%02x 0x%02x 0x%02x", | 1596 | pr_warn("Erroneous HV7131R ID 0x%02x 0x%02x 0x%02x\n", |
1595 | gspca_dev->usb_buf[0], gspca_dev->usb_buf[1], | 1597 | gspca_dev->usb_buf[0], gspca_dev->usb_buf[1], |
1596 | gspca_dev->usb_buf[2]); | 1598 | gspca_dev->usb_buf[2]); |
1597 | } | 1599 | } |
@@ -1710,7 +1712,7 @@ static void ov7648_probe(struct gspca_dev *gspca_dev) | |||
1710 | sd->sensor = SENSOR_PO1030; | 1712 | sd->sensor = SENSOR_PO1030; |
1711 | return; | 1713 | return; |
1712 | } | 1714 | } |
1713 | err("Unknown sensor %04x", val); | 1715 | pr_err("Unknown sensor %04x\n", val); |
1714 | } | 1716 | } |
1715 | 1717 | ||
1716 | /* 0c45:6142 sensor may be po2030n, gc0305 or gc0307 */ | 1718 | /* 0c45:6142 sensor may be po2030n, gc0305 or gc0307 */ |
@@ -1748,7 +1750,7 @@ static void po2030n_probe(struct gspca_dev *gspca_dev) | |||
1748 | PDEBUG(D_PROBE, "Sensor po2030n"); | 1750 | PDEBUG(D_PROBE, "Sensor po2030n"); |
1749 | /* sd->sensor = SENSOR_PO2030N; */ | 1751 | /* sd->sensor = SENSOR_PO2030N; */ |
1750 | } else { | 1752 | } else { |
1751 | err("Unknown sensor ID %04x", val); | 1753 | pr_err("Unknown sensor ID %04x\n", val); |
1752 | } | 1754 | } |
1753 | } | 1755 | } |
1754 | 1756 | ||