diff options
author | Ovidiu Toader <ovi@phas.ubc.ca> | 2014-06-02 20:38:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-04 15:09:42 -0400 |
commit | 941a8204d0bb92a20542c6a88ec9f2acb4b72d83 (patch) | |
tree | b8ccafa897b9a4d4a91f7b127139febcb0c154f5 | |
parent | 2abfeef620171db94ef59b85f7a81561019eda20 (diff) |
[media] staging/media/rtl2832u_sdr: fix coding style problems by adding blank lines
This minor patch fixes all WARNING:SPACING style warnings in rtl2832_sdr.c
The new version of the file pleases checkpatch.pl when run with "--ignore LONG_LINE".
Signed-off-by: Ovidiu Toader <ovi@phas.ubc.ca>
Acked-by: Antti Palosaari <crope@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c index d09a596fa476..4d2e30f52565 100644 --- a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c +++ b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | |||
@@ -348,6 +348,7 @@ static unsigned int rtl2832_sdr_convert_stream(struct rtl2832_sdr_state *s, | |||
348 | /* convert u8 to u16 */ | 348 | /* convert u8 to u16 */ |
349 | unsigned int i; | 349 | unsigned int i; |
350 | u16 *u16dst = dst; | 350 | u16 *u16dst = dst; |
351 | |||
351 | for (i = 0; i < src_len; i++) | 352 | for (i = 0; i < src_len; i++) |
352 | *u16dst++ = (src[i] << 8) | (src[i] >> 0); | 353 | *u16dst++ = (src[i] << 8) | (src[i] >> 0); |
353 | dst_len = 2 * src_len; | 354 | dst_len = 2 * src_len; |
@@ -359,6 +360,7 @@ static unsigned int rtl2832_sdr_convert_stream(struct rtl2832_sdr_state *s, | |||
359 | if (unlikely(time_is_before_jiffies(s->jiffies_next))) { | 360 | if (unlikely(time_is_before_jiffies(s->jiffies_next))) { |
360 | #define MSECS 10000UL | 361 | #define MSECS 10000UL |
361 | unsigned int samples = s->sample - s->sample_measured; | 362 | unsigned int samples = s->sample - s->sample_measured; |
363 | |||
362 | s->jiffies_next = jiffies + msecs_to_jiffies(MSECS); | 364 | s->jiffies_next = jiffies + msecs_to_jiffies(MSECS); |
363 | s->sample_measured = s->sample; | 365 | s->sample_measured = s->sample; |
364 | dev_dbg(&s->udev->dev, | 366 | dev_dbg(&s->udev->dev, |
@@ -560,11 +562,13 @@ static int rtl2832_sdr_alloc_urbs(struct rtl2832_sdr_state *s) | |||
560 | static void rtl2832_sdr_cleanup_queued_bufs(struct rtl2832_sdr_state *s) | 562 | static void rtl2832_sdr_cleanup_queued_bufs(struct rtl2832_sdr_state *s) |
561 | { | 563 | { |
562 | unsigned long flags = 0; | 564 | unsigned long flags = 0; |
565 | |||
563 | dev_dbg(&s->udev->dev, "%s:\n", __func__); | 566 | dev_dbg(&s->udev->dev, "%s:\n", __func__); |
564 | 567 | ||
565 | spin_lock_irqsave(&s->queued_bufs_lock, flags); | 568 | spin_lock_irqsave(&s->queued_bufs_lock, flags); |
566 | while (!list_empty(&s->queued_bufs)) { | 569 | while (!list_empty(&s->queued_bufs)) { |
567 | struct rtl2832_sdr_frame_buf *buf; | 570 | struct rtl2832_sdr_frame_buf *buf; |
571 | |||
568 | buf = list_entry(s->queued_bufs.next, | 572 | buf = list_entry(s->queued_bufs.next, |
569 | struct rtl2832_sdr_frame_buf, list); | 573 | struct rtl2832_sdr_frame_buf, list); |
570 | list_del(&buf->list); | 574 | list_del(&buf->list); |
@@ -577,6 +581,7 @@ static void rtl2832_sdr_cleanup_queued_bufs(struct rtl2832_sdr_state *s) | |||
577 | static void rtl2832_sdr_release_sec(struct dvb_frontend *fe) | 581 | static void rtl2832_sdr_release_sec(struct dvb_frontend *fe) |
578 | { | 582 | { |
579 | struct rtl2832_sdr_state *s = fe->sec_priv; | 583 | struct rtl2832_sdr_state *s = fe->sec_priv; |
584 | |||
580 | dev_dbg(&s->udev->dev, "%s:\n", __func__); | 585 | dev_dbg(&s->udev->dev, "%s:\n", __func__); |
581 | 586 | ||
582 | mutex_lock(&s->vb_queue_lock); | 587 | mutex_lock(&s->vb_queue_lock); |
@@ -598,6 +603,7 @@ static int rtl2832_sdr_querycap(struct file *file, void *fh, | |||
598 | struct v4l2_capability *cap) | 603 | struct v4l2_capability *cap) |
599 | { | 604 | { |
600 | struct rtl2832_sdr_state *s = video_drvdata(file); | 605 | struct rtl2832_sdr_state *s = video_drvdata(file); |
606 | |||
601 | dev_dbg(&s->udev->dev, "%s:\n", __func__); | 607 | dev_dbg(&s->udev->dev, "%s:\n", __func__); |
602 | 608 | ||
603 | strlcpy(cap->driver, KBUILD_MODNAME, sizeof(cap->driver)); | 609 | strlcpy(cap->driver, KBUILD_MODNAME, sizeof(cap->driver)); |
@@ -615,6 +621,7 @@ static int rtl2832_sdr_queue_setup(struct vb2_queue *vq, | |||
615 | unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[]) | 621 | unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[]) |
616 | { | 622 | { |
617 | struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq); | 623 | struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq); |
624 | |||
618 | dev_dbg(&s->udev->dev, "%s: *nbuffers=%d\n", __func__, *nbuffers); | 625 | dev_dbg(&s->udev->dev, "%s: *nbuffers=%d\n", __func__, *nbuffers); |
619 | 626 | ||
620 | /* Need at least 8 buffers */ | 627 | /* Need at least 8 buffers */ |
@@ -665,6 +672,7 @@ static int rtl2832_sdr_set_adc(struct rtl2832_sdr_state *s) | |||
665 | u8 buf[4], u8tmp1, u8tmp2; | 672 | u8 buf[4], u8tmp1, u8tmp2; |
666 | u64 u64tmp; | 673 | u64 u64tmp; |
667 | u32 u32tmp; | 674 | u32 u32tmp; |
675 | |||
668 | dev_dbg(&s->udev->dev, "%s: f_adc=%u\n", __func__, s->f_adc); | 676 | dev_dbg(&s->udev->dev, "%s: f_adc=%u\n", __func__, s->f_adc); |
669 | 677 | ||
670 | if (!test_bit(POWER_ON, &s->flags)) | 678 | if (!test_bit(POWER_ON, &s->flags)) |
@@ -988,6 +996,7 @@ static int rtl2832_sdr_start_streaming(struct vb2_queue *vq, unsigned int count) | |||
988 | { | 996 | { |
989 | struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq); | 997 | struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq); |
990 | int ret; | 998 | int ret; |
999 | |||
991 | dev_dbg(&s->udev->dev, "%s:\n", __func__); | 1000 | dev_dbg(&s->udev->dev, "%s:\n", __func__); |
992 | 1001 | ||
993 | if (!s->udev) | 1002 | if (!s->udev) |
@@ -1036,6 +1045,7 @@ err: | |||
1036 | static void rtl2832_sdr_stop_streaming(struct vb2_queue *vq) | 1045 | static void rtl2832_sdr_stop_streaming(struct vb2_queue *vq) |
1037 | { | 1046 | { |
1038 | struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq); | 1047 | struct rtl2832_sdr_state *s = vb2_get_drv_priv(vq); |
1048 | |||
1039 | dev_dbg(&s->udev->dev, "%s:\n", __func__); | 1049 | dev_dbg(&s->udev->dev, "%s:\n", __func__); |
1040 | 1050 | ||
1041 | mutex_lock(&s->v4l2_lock); | 1051 | mutex_lock(&s->v4l2_lock); |
@@ -1069,6 +1079,7 @@ static int rtl2832_sdr_g_tuner(struct file *file, void *priv, | |||
1069 | struct v4l2_tuner *v) | 1079 | struct v4l2_tuner *v) |
1070 | { | 1080 | { |
1071 | struct rtl2832_sdr_state *s = video_drvdata(file); | 1081 | struct rtl2832_sdr_state *s = video_drvdata(file); |
1082 | |||
1072 | dev_dbg(&s->udev->dev, "%s: index=%d type=%d\n", | 1083 | dev_dbg(&s->udev->dev, "%s: index=%d type=%d\n", |
1073 | __func__, v->index, v->type); | 1084 | __func__, v->index, v->type); |
1074 | 1085 | ||
@@ -1095,6 +1106,7 @@ static int rtl2832_sdr_s_tuner(struct file *file, void *priv, | |||
1095 | const struct v4l2_tuner *v) | 1106 | const struct v4l2_tuner *v) |
1096 | { | 1107 | { |
1097 | struct rtl2832_sdr_state *s = video_drvdata(file); | 1108 | struct rtl2832_sdr_state *s = video_drvdata(file); |
1109 | |||
1098 | dev_dbg(&s->udev->dev, "%s:\n", __func__); | 1110 | dev_dbg(&s->udev->dev, "%s:\n", __func__); |
1099 | 1111 | ||
1100 | if (v->index > 1) | 1112 | if (v->index > 1) |
@@ -1106,6 +1118,7 @@ static int rtl2832_sdr_enum_freq_bands(struct file *file, void *priv, | |||
1106 | struct v4l2_frequency_band *band) | 1118 | struct v4l2_frequency_band *band) |
1107 | { | 1119 | { |
1108 | struct rtl2832_sdr_state *s = video_drvdata(file); | 1120 | struct rtl2832_sdr_state *s = video_drvdata(file); |
1121 | |||
1109 | dev_dbg(&s->udev->dev, "%s: tuner=%d type=%d index=%d\n", | 1122 | dev_dbg(&s->udev->dev, "%s: tuner=%d type=%d index=%d\n", |
1110 | __func__, band->tuner, band->type, band->index); | 1123 | __func__, band->tuner, band->type, band->index); |
1111 | 1124 | ||
@@ -1131,6 +1144,7 @@ static int rtl2832_sdr_g_frequency(struct file *file, void *priv, | |||
1131 | { | 1144 | { |
1132 | struct rtl2832_sdr_state *s = video_drvdata(file); | 1145 | struct rtl2832_sdr_state *s = video_drvdata(file); |
1133 | int ret = 0; | 1146 | int ret = 0; |
1147 | |||
1134 | dev_dbg(&s->udev->dev, "%s: tuner=%d type=%d\n", | 1148 | dev_dbg(&s->udev->dev, "%s: tuner=%d type=%d\n", |
1135 | __func__, f->tuner, f->type); | 1149 | __func__, f->tuner, f->type); |
1136 | 1150 | ||
@@ -1194,6 +1208,7 @@ static int rtl2832_sdr_enum_fmt_sdr_cap(struct file *file, void *priv, | |||
1194 | struct v4l2_fmtdesc *f) | 1208 | struct v4l2_fmtdesc *f) |
1195 | { | 1209 | { |
1196 | struct rtl2832_sdr_state *s = video_drvdata(file); | 1210 | struct rtl2832_sdr_state *s = video_drvdata(file); |
1211 | |||
1197 | dev_dbg(&s->udev->dev, "%s:\n", __func__); | 1212 | dev_dbg(&s->udev->dev, "%s:\n", __func__); |
1198 | 1213 | ||
1199 | if (f->index >= NUM_FORMATS) | 1214 | if (f->index >= NUM_FORMATS) |
@@ -1209,6 +1224,7 @@ static int rtl2832_sdr_g_fmt_sdr_cap(struct file *file, void *priv, | |||
1209 | struct v4l2_format *f) | 1224 | struct v4l2_format *f) |
1210 | { | 1225 | { |
1211 | struct rtl2832_sdr_state *s = video_drvdata(file); | 1226 | struct rtl2832_sdr_state *s = video_drvdata(file); |
1227 | |||
1212 | dev_dbg(&s->udev->dev, "%s:\n", __func__); | 1228 | dev_dbg(&s->udev->dev, "%s:\n", __func__); |
1213 | 1229 | ||
1214 | f->fmt.sdr.pixelformat = s->pixelformat; | 1230 | f->fmt.sdr.pixelformat = s->pixelformat; |
@@ -1223,6 +1239,7 @@ static int rtl2832_sdr_s_fmt_sdr_cap(struct file *file, void *priv, | |||
1223 | struct rtl2832_sdr_state *s = video_drvdata(file); | 1239 | struct rtl2832_sdr_state *s = video_drvdata(file); |
1224 | struct vb2_queue *q = &s->vb_queue; | 1240 | struct vb2_queue *q = &s->vb_queue; |
1225 | int i; | 1241 | int i; |
1242 | |||
1226 | dev_dbg(&s->udev->dev, "%s: pixelformat fourcc %4.4s\n", __func__, | 1243 | dev_dbg(&s->udev->dev, "%s: pixelformat fourcc %4.4s\n", __func__, |
1227 | (char *)&f->fmt.sdr.pixelformat); | 1244 | (char *)&f->fmt.sdr.pixelformat); |
1228 | 1245 | ||
@@ -1248,6 +1265,7 @@ static int rtl2832_sdr_try_fmt_sdr_cap(struct file *file, void *priv, | |||
1248 | { | 1265 | { |
1249 | struct rtl2832_sdr_state *s = video_drvdata(file); | 1266 | struct rtl2832_sdr_state *s = video_drvdata(file); |
1250 | int i; | 1267 | int i; |
1268 | |||
1251 | dev_dbg(&s->udev->dev, "%s: pixelformat fourcc %4.4s\n", __func__, | 1269 | dev_dbg(&s->udev->dev, "%s: pixelformat fourcc %4.4s\n", __func__, |
1252 | (char *)&f->fmt.sdr.pixelformat); | 1270 | (char *)&f->fmt.sdr.pixelformat); |
1253 | 1271 | ||
@@ -1317,6 +1335,7 @@ static int rtl2832_sdr_s_ctrl(struct v4l2_ctrl *ctrl) | |||
1317 | struct dvb_frontend *fe = s->fe; | 1335 | struct dvb_frontend *fe = s->fe; |
1318 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; | 1336 | struct dtv_frontend_properties *c = &fe->dtv_property_cache; |
1319 | int ret; | 1337 | int ret; |
1338 | |||
1320 | dev_dbg(&s->udev->dev, | 1339 | dev_dbg(&s->udev->dev, |
1321 | "%s: id=%d name=%s val=%d min=%d max=%d step=%d\n", | 1340 | "%s: id=%d name=%s val=%d min=%d max=%d step=%d\n", |
1322 | __func__, ctrl->id, ctrl->name, ctrl->val, | 1341 | __func__, ctrl->id, ctrl->name, ctrl->val, |
@@ -1330,6 +1349,7 @@ static int rtl2832_sdr_s_ctrl(struct v4l2_ctrl *ctrl) | |||
1330 | /* Round towards the closest legal value */ | 1349 | /* Round towards the closest legal value */ |
1331 | s32 val = s->f_adc + s->bandwidth->step / 2; | 1350 | s32 val = s->f_adc + s->bandwidth->step / 2; |
1332 | u32 offset; | 1351 | u32 offset; |
1352 | |||
1333 | val = clamp(val, s->bandwidth->minimum, | 1353 | val = clamp(val, s->bandwidth->minimum, |
1334 | s->bandwidth->maximum); | 1354 | s->bandwidth->maximum); |
1335 | offset = val - s->bandwidth->minimum; | 1355 | offset = val - s->bandwidth->minimum; |