Commit 5e022d1a authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[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: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 46b1e21f
...@@ -20,8 +20,9 @@ ...@@ -20,8 +20,9 @@
#ifndef __SMS_CARDS_H__ #ifndef __SMS_CARDS_H__
#define __SMS_CARDS_H__ #define __SMS_CARDS_H__
#include <linux/usb.h>
#include "smscoreapi.h" #include "smscoreapi.h"
#include <linux/usb.h>
#include "smsir.h" #include "smsir.h"
#define SMS_BOARD_UNKNOWN 0 #define SMS_BOARD_UNKNOWN 0
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
#include "smscoreapi.h"
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -34,7 +36,6 @@ ...@@ -34,7 +36,6 @@
#include <linux/wait.h> #include <linux/wait.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include "smscoreapi.h"
#include "sms-cards.h" #include "sms-cards.h"
#include "smsir.h" #include "smsir.h"
......
...@@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -22,6 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef __SMS_CORE_API_H__ #ifndef __SMS_CORE_API_H__
#define __SMS_CORE_API_H__ #define __SMS_CORE_API_H__
#define pr_fmt(fmt) "%s:%s: " fmt, KBUILD_MODNAME, __func__
#include <linux/device.h> #include <linux/device.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/mm.h> #include <linux/mm.h>
...@@ -1177,22 +1179,17 @@ int smscore_led_state(struct smscore_device_t *core, int led); ...@@ -1177,22 +1179,17 @@ int smscore_led_state(struct smscore_device_t *core, int led);
#define DBG_INFO 1 #define DBG_INFO 1
#define DBG_ADV 2 #define DBG_ADV 2
#define sms_printk(kern, fmt, arg...) \ #define sms_log(fmt, arg...) pr_info(fmt "\n", ##arg)
printk(kern "%s: " fmt "\n", __func__, ##arg) #define sms_err(fmt, arg...) pr_err(fmt " on line: %d\n", ##arg, __LINE__)
#define sms_warn(fmt, arg...) pr_warn(fmt "\n", ##arg)
#define dprintk(kern, lvl, fmt, arg...) do {\ #define sms_info(fmt, arg...) do {\
if (sms_dbg & lvl) \ if (sms_dbg & DBG_INFO) \
sms_printk(kern, fmt, ##arg); \ pr_info(fmt "\n", ##arg); \
} while (0) } while (0)
#define sms_log(fmt, arg...) sms_printk(KERN_INFO, fmt, ##arg) #define sms_debug(fmt, arg...) do {\
#define sms_err(fmt, arg...) \ if (sms_dbg & DBG_ADV) \
sms_printk(KERN_ERR, "line: %d: " fmt, __LINE__, ##arg) printk(KERN_DEBUG pr_fmt(fmt "\n"), ##arg); \
#define sms_warn(fmt, arg...) sms_printk(KERN_WARNING, fmt, ##arg) } while (0)
#define sms_info(fmt, arg...) \
dprintk(KERN_INFO, DBG_INFO, fmt, ##arg)
#define sms_debug(fmt, arg...) \
dprintk(KERN_DEBUG, DBG_ADV, fmt, ##arg)
#endif /* __SMS_CORE_API_H__ */ #endif /* __SMS_CORE_API_H__ */
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* *
***********************************************************************/ ***********************************************************************/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include "smscoreapi.h"
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
#include "dvb_demux.h" #include "dvb_demux.h"
#include "dvb_frontend.h" #include "dvb_frontend.h"
#include "smscoreapi.h"
#include "smsdvb.h" #include "smsdvb.h"
static struct dentry *smsdvb_debugfs_usb_root; static struct dentry *smsdvb_debugfs_usb_root;
......
...@@ -19,6 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -19,6 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************/ ****************************************************************/
#include "smscoreapi.h"
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -29,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -29,7 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "dvb_demux.h" #include "dvb_demux.h"
#include "dvb_frontend.h" #include "dvb_frontend.h"
#include "smscoreapi.h"
#include "sms-cards.h" #include "sms-cards.h"
#include "smsdvb.h" #include "smsdvb.h"
......
...@@ -25,10 +25,11 @@ ...@@ -25,10 +25,11 @@
****************************************************************/ ****************************************************************/
#include "smscoreapi.h"
#include <linux/types.h> #include <linux/types.h>
#include <linux/input.h> #include <linux/input.h>
#include "smscoreapi.h"
#include "smsir.h" #include "smsir.h"
#include "sms-cards.h" #include "sms-cards.h"
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
* Fix stop command * Fix stop command
*/ */
#include "smscoreapi.h"
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/firmware.h> #include <linux/firmware.h>
...@@ -41,7 +43,6 @@ ...@@ -41,7 +43,6 @@
#include <linux/mmc/sdio_ids.h> #include <linux/mmc/sdio_ids.h>
#include <linux/module.h> #include <linux/module.h>
#include "smscoreapi.h"
#include "sms-cards.h" #include "sms-cards.h"
#include "smsendian.h" #include "smsendian.h"
......
...@@ -19,6 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -19,6 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************/ ****************************************************************/
#include "smscoreapi.h"
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/usb.h> #include <linux/usb.h>
...@@ -26,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -26,7 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/module.h> #include <linux/module.h>
#include "smscoreapi.h"
#include "sms-cards.h" #include "sms-cards.h"
#include "smsendian.h" #include "smsendian.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment