* [PATCH 1/2] i2c-parport: use dev_*
@ 2015-06-18 13:03 ` Sudip Mukherjee
0 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-06-18 13:03 UTC (permalink / raw)
To: Jean Delvare, Wolfram Sang; +Cc: linux-i2c, linux-kernel, Sudip Mukherjee
Now parport is using device model so use dev_* macros instead of printk.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/i2c/busses/i2c-parport.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c
index 9b94c3d..3794f7d 100644
--- a/drivers/i2c/busses/i2c-parport.c
+++ b/drivers/i2c/busses/i2c-parport.c
@@ -215,7 +215,8 @@ static void i2c_parport_attach(struct parport *port)
adapter->adapter.dev.parent = port->physport->dev;
if (parport_claim_or_block(adapter->pdev) < 0) {
- printk(KERN_ERR "i2c-parport: Could not claim parallel port\n");
+ dev_err(&adapter->pdev->dev,
+ "Could not claim parallel port\n");
goto err_unregister;
}
@@ -230,7 +231,7 @@ static void i2c_parport_attach(struct parport *port)
}
if (i2c_bit_add_bus(&adapter->adapter) < 0) {
- printk(KERN_ERR "i2c-parport: Unable to register with I2C\n");
+ dev_err(&adapter->pdev->dev, "Unable to register with I2C\n");
goto err_unregister;
}
@@ -242,8 +243,8 @@ static void i2c_parport_attach(struct parport *port)
if (adapter->ara)
parport_enable_irq(port);
else
- printk(KERN_WARNING "i2c-parport: Failed to register "
- "ARA client\n");
+ dev_warn(&adapter->pdev->dev,
+ "Failed to register ARA client\n");
}
/* Add the new adapter to the list */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 1/2] i2c-parport: use dev_*
@ 2015-06-18 13:03 ` Sudip Mukherjee
0 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-06-18 13:03 UTC (permalink / raw)
To: Jean Delvare, Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Sudip Mukherjee
Now parport is using device model so use dev_* macros instead of printk.
Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
---
drivers/i2c/busses/i2c-parport.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c
index 9b94c3d..3794f7d 100644
--- a/drivers/i2c/busses/i2c-parport.c
+++ b/drivers/i2c/busses/i2c-parport.c
@@ -215,7 +215,8 @@ static void i2c_parport_attach(struct parport *port)
adapter->adapter.dev.parent = port->physport->dev;
if (parport_claim_or_block(adapter->pdev) < 0) {
- printk(KERN_ERR "i2c-parport: Could not claim parallel port\n");
+ dev_err(&adapter->pdev->dev,
+ "Could not claim parallel port\n");
goto err_unregister;
}
@@ -230,7 +231,7 @@ static void i2c_parport_attach(struct parport *port)
}
if (i2c_bit_add_bus(&adapter->adapter) < 0) {
- printk(KERN_ERR "i2c-parport: Unable to register with I2C\n");
+ dev_err(&adapter->pdev->dev, "Unable to register with I2C\n");
goto err_unregister;
}
@@ -242,8 +243,8 @@ static void i2c_parport_attach(struct parport *port)
if (adapter->ara)
parport_enable_irq(port);
else
- printk(KERN_WARNING "i2c-parport: Failed to register "
- "ARA client\n");
+ dev_warn(&adapter->pdev->dev,
+ "Failed to register ARA client\n");
}
/* Add the new adapter to the list */
--
1.8.1.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] i2c-parport: start using pr_fmt
@ 2015-06-18 13:03 ` Sudip Mukherjee
0 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-06-18 13:03 UTC (permalink / raw)
To: Jean Delvare, Wolfram Sang; +Cc: linux-i2c, linux-kernel, Sudip Mukherjee
Start using pr_fmt and convert all remaining printk to use
pr_* family of macros.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
drivers/i2c/busses/i2c-parport.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c
index 3794f7d..881fe32 100644
--- a/drivers/i2c/busses/i2c-parport.c
+++ b/drivers/i2c/busses/i2c-parport.c
@@ -20,6 +20,8 @@
GNU General Public License for more details.
* ------------------------------------------------------------------------ */
+#define pr_fmt(fmt) "i2c-parport: " fmt
+
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
@@ -176,13 +178,13 @@ static void i2c_parport_attach(struct parport *port)
break;
}
if (i == MAX_DEVICE) {
- pr_debug("i2c-parport: Not using parport%d.\n", port->number);
+ pr_debug("Not using parport%d.\n", port->number);
return;
}
adapter = kzalloc(sizeof(struct i2c_par), GFP_KERNEL);
if (adapter == NULL) {
- printk(KERN_ERR "i2c-parport: Failed to kzalloc\n");
+ pr_err("Failed to kzalloc\n");
return;
}
memset(&i2c_parport_cb, 0, sizeof(i2c_parport_cb));
@@ -190,12 +192,12 @@ static void i2c_parport_attach(struct parport *port)
i2c_parport_cb.irq_func = i2c_parport_irq;
i2c_parport_cb.private = adapter;
- pr_debug("i2c-parport: attaching to %s\n", port->name);
+ pr_debug("attaching to %s\n", port->name);
parport_disable_irq(port);
adapter->pdev = parport_register_dev_model(port, "i2c-parport",
&i2c_parport_cb, i);
if (!adapter->pdev) {
- printk(KERN_ERR "i2c-parport: Unable to register with parport\n");
+ pr_err("Unable to register with parport\n");
goto err_free;
}
@@ -299,12 +301,12 @@ static struct parport_driver i2c_parport_driver = {
static int __init i2c_parport_init(void)
{
if (type < 0) {
- printk(KERN_WARNING "i2c-parport: adapter type unspecified\n");
+ pr_warn("adapter type unspecified\n");
return -ENODEV;
}
if (type >= ARRAY_SIZE(adapter_parm)) {
- printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type);
+ pr_warn("invalid type (%d)\n", type);
return -ENODEV;
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] i2c-parport: start using pr_fmt
@ 2015-06-18 13:03 ` Sudip Mukherjee
0 siblings, 0 replies; 7+ messages in thread
From: Sudip Mukherjee @ 2015-06-18 13:03 UTC (permalink / raw)
To: Jean Delvare, Wolfram Sang
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Sudip Mukherjee
Start using pr_fmt and convert all remaining printk to use
pr_* family of macros.
Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
---
drivers/i2c/busses/i2c-parport.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c
index 3794f7d..881fe32 100644
--- a/drivers/i2c/busses/i2c-parport.c
+++ b/drivers/i2c/busses/i2c-parport.c
@@ -20,6 +20,8 @@
GNU General Public License for more details.
* ------------------------------------------------------------------------ */
+#define pr_fmt(fmt) "i2c-parport: " fmt
+
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
@@ -176,13 +178,13 @@ static void i2c_parport_attach(struct parport *port)
break;
}
if (i == MAX_DEVICE) {
- pr_debug("i2c-parport: Not using parport%d.\n", port->number);
+ pr_debug("Not using parport%d.\n", port->number);
return;
}
adapter = kzalloc(sizeof(struct i2c_par), GFP_KERNEL);
if (adapter == NULL) {
- printk(KERN_ERR "i2c-parport: Failed to kzalloc\n");
+ pr_err("Failed to kzalloc\n");
return;
}
memset(&i2c_parport_cb, 0, sizeof(i2c_parport_cb));
@@ -190,12 +192,12 @@ static void i2c_parport_attach(struct parport *port)
i2c_parport_cb.irq_func = i2c_parport_irq;
i2c_parport_cb.private = adapter;
- pr_debug("i2c-parport: attaching to %s\n", port->name);
+ pr_debug("attaching to %s\n", port->name);
parport_disable_irq(port);
adapter->pdev = parport_register_dev_model(port, "i2c-parport",
&i2c_parport_cb, i);
if (!adapter->pdev) {
- printk(KERN_ERR "i2c-parport: Unable to register with parport\n");
+ pr_err("Unable to register with parport\n");
goto err_free;
}
@@ -299,12 +301,12 @@ static struct parport_driver i2c_parport_driver = {
static int __init i2c_parport_init(void)
{
if (type < 0) {
- printk(KERN_WARNING "i2c-parport: adapter type unspecified\n");
+ pr_warn("adapter type unspecified\n");
return -ENODEV;
}
if (type >= ARRAY_SIZE(adapter_parm)) {
- printk(KERN_WARNING "i2c-parport: invalid type (%d)\n", type);
+ pr_warn("invalid type (%d)\n", type);
return -ENODEV;
}
--
1.8.1.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] i2c-parport: use dev_*
@ 2015-07-09 20:02 ` Wolfram Sang
0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2015-07-09 20:02 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: Jean Delvare, linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 238 bytes --]
On Thu, Jun 18, 2015 at 06:33:46PM +0530, Sudip Mukherjee wrote:
> Now parport is using device model so use dev_* macros instead of printk.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Applied to for-next, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] i2c-parport: use dev_*
@ 2015-07-09 20:02 ` Wolfram Sang
0 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2015-07-09 20:02 UTC (permalink / raw)
To: Sudip Mukherjee
Cc: Jean Delvare, linux-i2c-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 262 bytes --]
On Thu, Jun 18, 2015 at 06:33:46PM +0530, Sudip Mukherjee wrote:
> Now parport is using device model so use dev_* macros instead of printk.
>
> Signed-off-by: Sudip Mukherjee <sudip-ofJRbWXBVFamYgehrs7/Lw@public.gmane.org>
Applied to for-next, thanks!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] i2c-parport: start using pr_fmt
2015-06-18 13:03 ` Sudip Mukherjee
(?)
@ 2015-07-09 20:04 ` Wolfram Sang
-1 siblings, 0 replies; 7+ messages in thread
From: Wolfram Sang @ 2015-07-09 20:04 UTC (permalink / raw)
To: Sudip Mukherjee; +Cc: Jean Delvare, linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
On Thu, Jun 18, 2015 at 06:33:47PM +0530, Sudip Mukherjee wrote:
> Start using pr_fmt and convert all remaining printk to use
> pr_* family of macros.
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Applied to for-next, thanks!
One modification:
> adapter = kzalloc(sizeof(struct i2c_par), GFP_KERNEL);
> if (adapter == NULL) {
> - printk(KERN_ERR "i2c-parport: Failed to kzalloc\n");
> + pr_err("Failed to kzalloc\n");
I removed this printout, since we get a dump in this case anyhow.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-09 20:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-18 13:03 [PATCH 1/2] i2c-parport: use dev_* Sudip Mukherjee
2015-06-18 13:03 ` Sudip Mukherjee
2015-06-18 13:03 ` [PATCH 2/2] i2c-parport: start using pr_fmt Sudip Mukherjee
2015-06-18 13:03 ` Sudip Mukherjee
2015-07-09 20:04 ` Wolfram Sang
2015-07-09 20:02 ` [PATCH 1/2] i2c-parport: use dev_* Wolfram Sang
2015-07-09 20:02 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.