diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 08:40:22 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 09:03:53 -0400 |
commit | 05ad412a63d66175f8f5a3d08894cf3f1d118cbc (patch) | |
tree | f11eeea793de25cf5be1a02ff54f711f97ed60e3 /drivers/media/common | |
parent | 28a59df4d7cb8f749ba92ad304df4063ccf108fd (diff) |
[media] siano: Fix the remaining checkpatch.pl compliants
Fix all other remaining checkpatch.pl compliants on the Siano driver,
except for the 80-cols (soft) limit. Those are harder to fix, and
probably not worth to do right now.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/siano/smscoreapi.c | 15 | ||||
-rw-r--r-- | drivers/media/common/siano/smscoreapi.h | 4 | ||||
-rw-r--r-- | drivers/media/common/siano/smsdvb-debugfs.c | 7 |
3 files changed, 9 insertions, 17 deletions
diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c index 19e7a5fb4183..e7fc4deded56 100644 --- a/drivers/media/common/siano/smscoreapi.c +++ b/drivers/media/common/siano/smscoreapi.c | |||
@@ -57,8 +57,8 @@ struct smscore_client_t { | |||
57 | struct list_head entry; | 57 | struct list_head entry; |
58 | struct smscore_device_t *coredev; | 58 | struct smscore_device_t *coredev; |
59 | void *context; | 59 | void *context; |
60 | struct list_head idlist; | 60 | struct list_head idlist; |
61 | onresponse_t onresponse_handler; | 61 | onresponse_t onresponse_handler; |
62 | onremove_t onremove_handler; | 62 | onremove_t onremove_handler; |
63 | }; | 63 | }; |
64 | 64 | ||
@@ -874,7 +874,7 @@ int smscore_configure_board(struct smscore_device_t *coredev) | |||
874 | * sets initial device mode and notifies client hotplugs that device is ready | 874 | * sets initial device mode and notifies client hotplugs that device is ready |
875 | * | 875 | * |
876 | * @param coredev pointer to a coredev object returned by | 876 | * @param coredev pointer to a coredev object returned by |
877 | * smscore_register_device | 877 | * smscore_register_device |
878 | * | 878 | * |
879 | * @return 0 on success, <0 on error. | 879 | * @return 0 on success, <0 on error. |
880 | */ | 880 | */ |
@@ -961,7 +961,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev, | |||
961 | while (size && rc >= 0) { | 961 | while (size && rc >= 0) { |
962 | struct sms_data_download *data_msg = | 962 | struct sms_data_download *data_msg = |
963 | (struct sms_data_download *) msg; | 963 | (struct sms_data_download *) msg; |
964 | int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE); | 964 | int payload_size = min_t(int, size, SMS_MAX_PAYLOAD_SIZE); |
965 | 965 | ||
966 | SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_DOWNLOAD_REQ, | 966 | SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_DOWNLOAD_REQ, |
967 | (u16)(sizeof(struct sms_msg_hdr) + | 967 | (u16)(sizeof(struct sms_msg_hdr) + |
@@ -1225,8 +1225,7 @@ void smscore_unregister_device(struct smscore_device_t *coredev) | |||
1225 | if (num_buffers == coredev->num_buffers) | 1225 | if (num_buffers == coredev->num_buffers) |
1226 | break; | 1226 | break; |
1227 | if (++retry > 10) { | 1227 | if (++retry > 10) { |
1228 | sms_info("exiting although " | 1228 | sms_info("exiting although not all buffers released."); |
1229 | "not all buffers released."); | ||
1230 | break; | 1229 | break; |
1231 | } | 1230 | } |
1232 | 1231 | ||
@@ -1279,8 +1278,8 @@ static int smscore_detect_mode(struct smscore_device_t *coredev) | |||
1279 | coredev, msg, msg->msg_length, | 1278 | coredev, msg, msg->msg_length, |
1280 | &coredev->version_ex_done); | 1279 | &coredev->version_ex_done); |
1281 | if (rc < 0) | 1280 | if (rc < 0) |
1282 | sms_err("MSG_SMS_GET_VERSION_EX_REQ failed " | 1281 | sms_err("MSG_SMS_GET_VERSION_EX_REQ failed second try, rc %d", |
1283 | "second try, rc %d", rc); | 1282 | rc); |
1284 | } else | 1283 | } else |
1285 | rc = -ETIME; | 1284 | rc = -ETIME; |
1286 | } | 1285 | } |
diff --git a/drivers/media/common/siano/smscoreapi.h b/drivers/media/common/siano/smscoreapi.h index d3e781fedbc9..d0799e323364 100644 --- a/drivers/media/common/siano/smscoreapi.h +++ b/drivers/media/common/siano/smscoreapi.h | |||
@@ -40,10 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
40 | #define kmutex_trylock(_p_) mutex_trylock(_p_) | 40 | #define kmutex_trylock(_p_) mutex_trylock(_p_) |
41 | #define kmutex_unlock(_p_) mutex_unlock(_p_) | 41 | #define kmutex_unlock(_p_) mutex_unlock(_p_) |
42 | 42 | ||
43 | #ifndef min | ||
44 | #define min(a, b) (((a) < (b)) ? (a) : (b)) | ||
45 | #endif | ||
46 | |||
47 | /* | 43 | /* |
48 | * Define the firmware names used by the driver. | 44 | * Define the firmware names used by the driver. |
49 | * Those should match what's used at smscoreapi.c and sms-cards.c | 45 | * Those should match what's used at smscoreapi.c and sms-cards.c |
diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c index a881da548251..4c5691ee9eaf 100644 --- a/drivers/media/common/siano/smsdvb-debugfs.c +++ b/drivers/media/common/siano/smsdvb-debugfs.c | |||
@@ -112,7 +112,7 @@ void smsdvb_print_dvb_stats(struct smsdvb_debugfs *debug_data, | |||
112 | "burst_cycle_time = %d\n", p->burst_cycle_time); | 112 | "burst_cycle_time = %d\n", p->burst_cycle_time); |
113 | n += snprintf(&buf[n], PAGE_SIZE - n, | 113 | n += snprintf(&buf[n], PAGE_SIZE - n, |
114 | "calc_burst_cycle_time = %d\n", | 114 | "calc_burst_cycle_time = %d\n", |
115 | p->calc_burst_cycle_time); | 115 | p->calc_burst_cycle_time); |
116 | n += snprintf(&buf[n], PAGE_SIZE - n, | 116 | n += snprintf(&buf[n], PAGE_SIZE - n, |
117 | "num_of_rows = %d\n", p->num_of_rows); | 117 | "num_of_rows = %d\n", p->num_of_rows); |
118 | n += snprintf(&buf[n], PAGE_SIZE - n, | 118 | n += snprintf(&buf[n], PAGE_SIZE - n, |
@@ -509,8 +509,6 @@ void smsdvb_debugfs_release(struct smsdvb_client_t *client) | |||
509 | if (!client->debugfs) | 509 | if (!client->debugfs) |
510 | return; | 510 | return; |
511 | 511 | ||
512 | printk("%s\n", __func__); | ||
513 | |||
514 | client->prt_dvb_stats = NULL; | 512 | client->prt_dvb_stats = NULL; |
515 | client->prt_isdb_stats = NULL; | 513 | client->prt_isdb_stats = NULL; |
516 | client->prt_isdb_stats_ex = NULL; | 514 | client->prt_isdb_stats_ex = NULL; |
@@ -548,7 +546,6 @@ int smsdvb_debugfs_register(void) | |||
548 | 546 | ||
549 | void smsdvb_debugfs_unregister(void) | 547 | void smsdvb_debugfs_unregister(void) |
550 | { | 548 | { |
551 | if (smsdvb_debugfs_usb_root) | 549 | debugfs_remove_recursive(smsdvb_debugfs_usb_root); |
552 | debugfs_remove_recursive(smsdvb_debugfs_usb_root); | ||
553 | smsdvb_debugfs_usb_root = NULL; | 550 | smsdvb_debugfs_usb_root = NULL; |
554 | } | 551 | } |