pr_info everywhere

This commit is contained in:
Ciro Santilli
2017-07-14 11:30:16 +01:00
parent 1918c4fdfe
commit 0f1fbaf026
8 changed files with 11 additions and 11 deletions

View File

@@ -57,7 +57,7 @@ static struct task_struct *kthread;
static int work_func(void *data)
{
while (!kthread_should_stop()) {
printk(KERN_INFO "%d\n", lkmc_dep);
pr_info("%d\n", lkmc_dep);
usleep_range(1000000, 1000001);
}
return 0;

View File

@@ -22,7 +22,7 @@ static int work_func(void *data)
{
int i = 0;
while (!kthread_should_stop()) {
printk(KERN_INFO "%d\n", i);
pr_info("%d\n", i);
usleep_range(1000000, 1000001);
i++;
if (i == 10)

View File

@@ -15,7 +15,7 @@ static int work_func1(void *data)
{
int i = 0;
while (!kthread_should_stop()) {
printk(KERN_INFO "1 %d\n", i);
pr_info("1 %d\n", i);
usleep_range(1000000, 1000001);
i++;
if (i == 10)
@@ -28,7 +28,7 @@ static int work_func2(void *data)
{
int i = 0;
while (!kthread_should_stop()) {
printk(KERN_INFO "2 %d\n", i);
pr_info("2 %d\n", i);
usleep_range(1000000, 1000001);
i++;
if (i == 10)

View File

@@ -17,11 +17,11 @@ MODULE_LICENSE("GPL");
int init_module(void)
{
printk(KERN_INFO "init_module\n");
pr_info("init_module\n");
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "cleanup_module\n");
pr_info("cleanup_module\n");
}

View File

@@ -15,14 +15,14 @@ The alternative is to get the serial data out streamed to console or to a file:
static int myinit(void)
{
printk(KERN_INFO "panic init\n");
pr_info("panic init\n");
panic("hello panic");
return 0;
}
static void myexit(void)
{
printk(KERN_INFO "panic cleanup\n");
pr_info("panic cleanup\n");
}
module_init(myinit)

View File

@@ -24,7 +24,7 @@ static void work_func(struct work_struct *work)
{
int i = 0;
while (atomic_read(&run)) {
printk(KERN_INFO "%d\n", i);
pr_info("%d\n", i);
usleep_range(1000000, 1000001);
i++;
if (i == 10)

View File

@@ -18,7 +18,7 @@ DECLARE_WORK(work, work_func);
static void work_func(struct work_struct *work)
{
printk(KERN_INFO "%d\n", i);
pr_info("%d\n", i);
i++;
queue_delayed_work(queue, &next_work, HZ);
}

View File

@@ -27,7 +27,7 @@ static struct workqueue_struct *queue;
static void work_func(struct work_struct *work)
{
printk(KERN_INFO "worker\n");
pr_info("worker\n");
}
DECLARE_WORK(work, work_func);