diff options
Diffstat (limited to 'drivers/media/video/gspca/m5602/m5602_po1030.c')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_po1030.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.c b/drivers/media/video/gspca/m5602/m5602_po1030.c index 1febd34c2f0..b8771698cbc 100644 --- a/drivers/media/video/gspca/m5602/m5602_po1030.c +++ b/drivers/media/video/gspca/m5602/m5602_po1030.c | |||
@@ -16,6 +16,8 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
20 | |||
19 | #include "m5602_po1030.h" | 21 | #include "m5602_po1030.h" |
20 | 22 | ||
21 | static int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val); | 23 | static int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val); |
@@ -197,7 +199,7 @@ int po1030_probe(struct sd *sd) | |||
197 | 199 | ||
198 | if (force_sensor) { | 200 | if (force_sensor) { |
199 | if (force_sensor == PO1030_SENSOR) { | 201 | if (force_sensor == PO1030_SENSOR) { |
200 | info("Forcing a %s sensor", po1030.name); | 202 | pr_info("Forcing a %s sensor\n", po1030.name); |
201 | goto sensor_found; | 203 | goto sensor_found; |
202 | } | 204 | } |
203 | /* If we want to force another sensor, don't try to probe this | 205 | /* If we want to force another sensor, don't try to probe this |
@@ -221,7 +223,7 @@ int po1030_probe(struct sd *sd) | |||
221 | return -ENODEV; | 223 | return -ENODEV; |
222 | 224 | ||
223 | if (dev_id_h == 0x30) { | 225 | if (dev_id_h == 0x30) { |
224 | info("Detected a po1030 sensor"); | 226 | pr_info("Detected a po1030 sensor\n"); |
225 | goto sensor_found; | 227 | goto sensor_found; |
226 | } | 228 | } |
227 | return -ENODEV; | 229 | return -ENODEV; |
@@ -267,7 +269,7 @@ int po1030_init(struct sd *sd) | |||
267 | break; | 269 | break; |
268 | 270 | ||
269 | default: | 271 | default: |
270 | info("Invalid stream command, exiting init"); | 272 | pr_info("Invalid stream command, exiting init\n"); |
271 | return -EINVAL; | 273 | return -EINVAL; |
272 | } | 274 | } |
273 | } | 275 | } |
@@ -733,16 +735,15 @@ static void po1030_dump_registers(struct sd *sd) | |||
733 | int address; | 735 | int address; |
734 | u8 value = 0; | 736 | u8 value = 0; |
735 | 737 | ||
736 | info("Dumping the po1030 sensor core registers"); | 738 | pr_info("Dumping the po1030 sensor core registers\n"); |
737 | for (address = 0; address < 0x7f; address++) { | 739 | for (address = 0; address < 0x7f; address++) { |
738 | m5602_read_sensor(sd, address, &value, 1); | 740 | m5602_read_sensor(sd, address, &value, 1); |
739 | info("register 0x%x contains 0x%x", | 741 | pr_info("register 0x%x contains 0x%x\n", address, value); |
740 | address, value); | ||
741 | } | 742 | } |
742 | 743 | ||
743 | info("po1030 register state dump complete"); | 744 | pr_info("po1030 register state dump complete\n"); |
744 | 745 | ||
745 | info("Probing for which registers that are read/write"); | 746 | pr_info("Probing for which registers that are read/write\n"); |
746 | for (address = 0; address < 0xff; address++) { | 747 | for (address = 0; address < 0xff; address++) { |
747 | u8 old_value, ctrl_value; | 748 | u8 old_value, ctrl_value; |
748 | u8 test_value[2] = {0xff, 0xff}; | 749 | u8 test_value[2] = {0xff, 0xff}; |
@@ -752,9 +753,9 @@ static void po1030_dump_registers(struct sd *sd) | |||
752 | m5602_read_sensor(sd, address, &ctrl_value, 1); | 753 | m5602_read_sensor(sd, address, &ctrl_value, 1); |
753 | 754 | ||
754 | if (ctrl_value == test_value[0]) | 755 | if (ctrl_value == test_value[0]) |
755 | info("register 0x%x is writeable", address); | 756 | pr_info("register 0x%x is writeable\n", address); |
756 | else | 757 | else |
757 | info("register 0x%x is read only", address); | 758 | pr_info("register 0x%x is read only\n", address); |
758 | 759 | ||
759 | /* Restore original value */ | 760 | /* Restore original value */ |
760 | m5602_write_sensor(sd, address, &old_value, 1); | 761 | m5602_write_sensor(sd, address, &old_value, 1); |