Using pr_* macros are more prefferable than using printk. Start using
pr_* family of macros and define pr_fmt to be used with it.
While at it remove DRVNAME from an existing pr_info() as the name is now
being printed by pr_fmt.

Signed-off-by: Sudip Mukherjee <[email protected]>
---
 drivers/spi/spi-lm70llp.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/spi-lm70llp.c b/drivers/spi/spi-lm70llp.c
index 62d0f6d..39cf5dc 100644
--- a/drivers/spi/spi-lm70llp.c
+++ b/drivers/spi/spi-lm70llp.c
@@ -13,6 +13,7 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/init.h>
 #include <linux/module.h>
@@ -199,9 +200,7 @@ static void spi_lm70llp_attach(struct parport *p)
        int                     status;
 
        if (lm70llp) {
-               printk(KERN_WARNING
-                       "%s: spi_lm70llp instance already loaded. Aborting.\n",
-                       DRVNAME);
+               pr_warn("spi_lm70llp instance already loaded. Aborting.\n");
                return;
        }
 
@@ -246,9 +245,7 @@ static void spi_lm70llp_attach(struct parport *p)
         */
        status = spi_bitbang_start(&pp->bitbang);
        if (status < 0) {
-               printk(KERN_WARNING
-                       "%s: spi_bitbang_start failed with status %d\n",
-                       DRVNAME, status);
+               pr_warn("spi_bitbang_start failed with status %d\n", status);
                goto out_off_and_release;
        }
 
@@ -275,7 +272,7 @@ static void spi_lm70llp_attach(struct parport *p)
                dev_dbg(&pp->spidev_lm70->dev, "spidev_lm70 at %s\n",
                        dev_name(&pp->spidev_lm70->dev));
        else {
-               printk(KERN_WARNING "%s: spi_new_device failed\n", DRVNAME);
+               pr_warn("spi_new_device failed\n");
                status = -ENODEV;
                goto out_bitbang_stop;
        }
@@ -296,7 +293,7 @@ out_parport_unreg:
 out_free_master:
        spi_master_put(master);
 out_fail:
-       pr_info("%s: spi_lm70llp probe fail, status %d\n", DRVNAME, status);
+       pr_info("spi_lm70llp probe fail, status %d\n", status);
 }
 
 static void spi_lm70llp_detach(struct parport *p)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to