diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-22 08:46:56 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-26 07:10:01 -0500 |
commit | 5e022d1aa0be77d749939a56f751f62ed8ee4d2b (patch) | |
tree | 5a7a709049e7c38ed3b0e76c198ffccca0bc8873 | |
parent | 46b1e21fe50f9f58ceaffc10c5aea50366cf7af5 (diff) |
[media] siano: use pr_* print functions
Instead of defining its own set of printk functions, let's
use the common Kernel debug logic provided by pr_foo functions.
As a first step, let's just define the existing macros as the
Kernel ones.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/common/siano/sms-cards.h | 3 | ||||
-rw-r--r-- | drivers/media/common/siano/smscoreapi.c | 3 | ||||
-rw-r--r-- | drivers/media/common/siano/smscoreapi.h | 27 | ||||
-rw-r--r-- | drivers/media/common/siano/smsdvb-debugfs.c | 4 | ||||
-rw-r--r-- | drivers/media/common/siano/smsdvb-main.c | 3 | ||||
-rw-r--r-- | drivers/media/common/siano/smsir.c | 3 | ||||
-rw-r--r-- | drivers/media/mmc/siano/smssdio.c | 3 | ||||
-rw-r--r-- | drivers/media/usb/siano/smsusb.c | 3 |
8 files changed, 25 insertions, 24 deletions
diff --git a/drivers/media/common/siano/sms-cards.h b/drivers/media/common/siano/sms-cards.h index 4c4caddf9869..bb3d733f092b 100644 --- a/drivers/media/common/siano/sms-cards.h +++ b/drivers/media/common/siano/sms-cards.h | |||
@@ -20,8 +20,9 @@ | |||
20 | #ifndef __SMS_CARDS_H__ | 20 | #ifndef __SMS_CARDS_H__ |
21 | #define __SMS_CARDS_H__ | 21 | #define __SMS_CARDS_H__ |
22 | 22 | ||
23 | #include <linux/usb.h> | ||
24 | #include "smscoreapi.h" | 23 | #include "smscoreapi.h" |
24 | |||
25 | #include <linux/usb.h> | ||
25 | #include "smsir.h" | 26 | #include "smsir.h" |
26 | 27 | ||
27 | #define SMS_BOARD_UNKNOWN 0 | 28 | #define SMS_BOARD_UNKNOWN 0 |
diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c index a3677438205e..26dc4392c3e1 100644 --- a/drivers/media/common/siano/smscoreapi.c +++ b/drivers/media/common/siano/smscoreapi.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include "smscoreapi.h" | ||
25 | |||
24 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
25 | #include <linux/init.h> | 27 | #include <linux/init.h> |
26 | #include <linux/module.h> | 28 | #include <linux/module.h> |
@@ -34,7 +36,6 @@ | |||
34 | #include <linux/wait.h> | 36 | #include <linux/wait.h> |
35 | #include <asm/byteorder.h> | 37 | #include <asm/byteorder.h> |
36 | 38 | ||
37 | #include "smscoreapi.h" | ||
38 | #include "sms-cards.h" | 39 | #include "sms-cards.h" |
39 | #include "smsir.h" | 40 | #include "smsir.h" |
40 | 41 | ||
diff --git a/drivers/media/common/siano/smscoreapi.h b/drivers/media/common/siano/smscoreapi.h index efe4ab090aec..b5d85fd0bee8 100644 --- a/drivers/media/common/siano/smscoreapi.h +++ b/drivers/media/common/siano/smscoreapi.h | |||
@@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
22 | #ifndef __SMS_CORE_API_H__ | 22 | #ifndef __SMS_CORE_API_H__ |
23 | #define __SMS_CORE_API_H__ | 23 | #define __SMS_CORE_API_H__ |
24 | 24 | ||
25 | #define pr_fmt(fmt) "%s:%s: " fmt, KBUILD_MODNAME, __func__ | ||
26 | |||
25 | #include <linux/device.h> | 27 | #include <linux/device.h> |
26 | #include <linux/list.h> | 28 | #include <linux/list.h> |
27 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
@@ -1177,22 +1179,17 @@ int smscore_led_state(struct smscore_device_t *core, int led); | |||
1177 | #define DBG_INFO 1 | 1179 | #define DBG_INFO 1 |
1178 | #define DBG_ADV 2 | 1180 | #define DBG_ADV 2 |
1179 | 1181 | ||
1180 | #define sms_printk(kern, fmt, arg...) \ | 1182 | #define sms_log(fmt, arg...) pr_info(fmt "\n", ##arg) |
1181 | printk(kern "%s: " fmt "\n", __func__, ##arg) | 1183 | #define sms_err(fmt, arg...) pr_err(fmt " on line: %d\n", ##arg, __LINE__) |
1182 | 1184 | #define sms_warn(fmt, arg...) pr_warn(fmt "\n", ##arg) | |
1183 | #define dprintk(kern, lvl, fmt, arg...) do {\ | 1185 | #define sms_info(fmt, arg...) do {\ |
1184 | if (sms_dbg & lvl) \ | 1186 | if (sms_dbg & DBG_INFO) \ |
1185 | sms_printk(kern, fmt, ##arg); \ | 1187 | pr_info(fmt "\n", ##arg); \ |
1186 | } while (0) | 1188 | } while (0) |
1187 | 1189 | ||
1188 | #define sms_log(fmt, arg...) sms_printk(KERN_INFO, fmt, ##arg) | 1190 | #define sms_debug(fmt, arg...) do {\ |
1189 | #define sms_err(fmt, arg...) \ | 1191 | if (sms_dbg & DBG_ADV) \ |
1190 | sms_printk(KERN_ERR, "line: %d: " fmt, __LINE__, ##arg) | 1192 | printk(KERN_DEBUG pr_fmt(fmt "\n"), ##arg); \ |
1191 | #define sms_warn(fmt, arg...) sms_printk(KERN_WARNING, fmt, ##arg) | 1193 | } while (0) |
1192 | #define sms_info(fmt, arg...) \ | ||
1193 | dprintk(KERN_INFO, DBG_INFO, fmt, ##arg) | ||
1194 | #define sms_debug(fmt, arg...) \ | ||
1195 | dprintk(KERN_DEBUG, DBG_ADV, fmt, ##arg) | ||
1196 | |||
1197 | 1194 | ||
1198 | #endif /* __SMS_CORE_API_H__ */ | 1195 | #endif /* __SMS_CORE_API_H__ */ |
diff --git a/drivers/media/common/siano/smsdvb-debugfs.c b/drivers/media/common/siano/smsdvb-debugfs.c index 2408d7e9451e..c3e1a404e4f6 100644 --- a/drivers/media/common/siano/smsdvb-debugfs.c +++ b/drivers/media/common/siano/smsdvb-debugfs.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * | 17 | * |
18 | ***********************************************************************/ | 18 | ***********************************************************************/ |
19 | 19 | ||
20 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 20 | #include "smscoreapi.h" |
21 | 21 | ||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
@@ -31,8 +31,6 @@ | |||
31 | #include "dvb_demux.h" | 31 | #include "dvb_demux.h" |
32 | #include "dvb_frontend.h" | 32 | #include "dvb_frontend.h" |
33 | 33 | ||
34 | #include "smscoreapi.h" | ||
35 | |||
36 | #include "smsdvb.h" | 34 | #include "smsdvb.h" |
37 | 35 | ||
38 | static struct dentry *smsdvb_debugfs_usb_root; | 36 | static struct dentry *smsdvb_debugfs_usb_root; |
diff --git a/drivers/media/common/siano/smsdvb-main.c b/drivers/media/common/siano/smsdvb-main.c index 042515915e20..6eb1b14092cb 100644 --- a/drivers/media/common/siano/smsdvb-main.c +++ b/drivers/media/common/siano/smsdvb-main.c | |||
@@ -19,6 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
19 | 19 | ||
20 | ****************************************************************/ | 20 | ****************************************************************/ |
21 | 21 | ||
22 | #include "smscoreapi.h" | ||
23 | |||
22 | #include <linux/module.h> | 24 | #include <linux/module.h> |
23 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
24 | #include <linux/init.h> | 26 | #include <linux/init.h> |
@@ -29,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
29 | #include "dvb_demux.h" | 31 | #include "dvb_demux.h" |
30 | #include "dvb_frontend.h" | 32 | #include "dvb_frontend.h" |
31 | 33 | ||
32 | #include "smscoreapi.h" | ||
33 | #include "sms-cards.h" | 34 | #include "sms-cards.h" |
34 | 35 | ||
35 | #include "smsdvb.h" | 36 | #include "smsdvb.h" |
diff --git a/drivers/media/common/siano/smsir.c b/drivers/media/common/siano/smsir.c index 35d0e887bd65..2dcae6ace282 100644 --- a/drivers/media/common/siano/smsir.c +++ b/drivers/media/common/siano/smsir.c | |||
@@ -25,10 +25,11 @@ | |||
25 | ****************************************************************/ | 25 | ****************************************************************/ |
26 | 26 | ||
27 | 27 | ||
28 | #include "smscoreapi.h" | ||
29 | |||
28 | #include <linux/types.h> | 30 | #include <linux/types.h> |
29 | #include <linux/input.h> | 31 | #include <linux/input.h> |
30 | 32 | ||
31 | #include "smscoreapi.h" | ||
32 | #include "smsir.h" | 33 | #include "smsir.h" |
33 | #include "sms-cards.h" | 34 | #include "sms-cards.h" |
34 | 35 | ||
diff --git a/drivers/media/mmc/siano/smssdio.c b/drivers/media/mmc/siano/smssdio.c index 912c2814c6cf..4e61544c34b9 100644 --- a/drivers/media/mmc/siano/smssdio.c +++ b/drivers/media/mmc/siano/smssdio.c | |||
@@ -32,6 +32,8 @@ | |||
32 | * Fix stop command | 32 | * Fix stop command |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "smscoreapi.h" | ||
36 | |||
35 | #include <linux/moduleparam.h> | 37 | #include <linux/moduleparam.h> |
36 | #include <linux/slab.h> | 38 | #include <linux/slab.h> |
37 | #include <linux/firmware.h> | 39 | #include <linux/firmware.h> |
@@ -41,7 +43,6 @@ | |||
41 | #include <linux/mmc/sdio_ids.h> | 43 | #include <linux/mmc/sdio_ids.h> |
42 | #include <linux/module.h> | 44 | #include <linux/module.h> |
43 | 45 | ||
44 | #include "smscoreapi.h" | ||
45 | #include "sms-cards.h" | 46 | #include "sms-cards.h" |
46 | #include "smsendian.h" | 47 | #include "smsendian.h" |
47 | 48 | ||
diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index 4b6db7557e33..426455118d02 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c | |||
@@ -19,6 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
19 | 19 | ||
20 | ****************************************************************/ | 20 | ****************************************************************/ |
21 | 21 | ||
22 | #include "smscoreapi.h" | ||
23 | |||
22 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
23 | #include <linux/init.h> | 25 | #include <linux/init.h> |
24 | #include <linux/usb.h> | 26 | #include <linux/usb.h> |
@@ -26,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
26 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
27 | #include <linux/module.h> | 29 | #include <linux/module.h> |
28 | 30 | ||
29 | #include "smscoreapi.h" | ||
30 | #include "sms-cards.h" | 31 | #include "sms-cards.h" |
31 | #include "smsendian.h" | 32 | #include "smsendian.h" |
32 | 33 | ||