From patchwork Wed Jul 21 18:55:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 113444 X-Patchwork-Delegate: grant.likely@secretlab.ca Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6LIttdS022434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 21 Jul 2010 18:56:31 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1ObeSM-0006mu-AE; Wed, 21 Jul 2010 18:55:50 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1ObeSL-0006mo-K5 for spi-devel-general@lists.sourceforge.net; Wed, 21 Jul 2010 18:55:49 +0000 X-ACL-Warn: Received: from mail.perches.com ([173.55.12.10]) by sfi-mx-4.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1ObeSK-0004fQ-9S for spi-devel-general@lists.sourceforge.net; Wed, 21 Jul 2010 18:55:49 +0000 Received: from [192.168.1.151] (Joe-Laptop.home [192.168.1.151]) by mail.perches.com (Postfix) with ESMTP id 9BB0324368; Wed, 21 Jul 2010 11:55:30 -0700 (PDT) From: Joe Perches To: David Brownell , Grant Likely Date: Wed, 21 Jul 2010 11:55:41 -0700 Message-ID: <1279738541.4640.15.camel@Joe-Laptop.home> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1ObeSK-0004fQ-9S Cc: spi-devel-general@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: [spi-devel-general] [PATCH] drivers/spi: Convert printks to pr_ X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 21 Jul 2010 18:56:32 +0000 (UTC) diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index f0a1418..427fa44 100644 --- a/drivers/spi/amba-pl022.c +++ b/drivers/spi/amba-pl022.c @@ -30,6 +30,8 @@ * - add generic DMA framework support */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -1775,8 +1777,8 @@ pl022_probe(struct amba_device *adev, struct amba_id *id) status = -ENOMEM; goto err_no_ioremap; } - printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n", - adev->res.start, pl022->virtbase); + pr_info("mapped registers from 0x%08llx to %p\n", + (unsigned long long)adev->res.start, pl022->virtbase); pl022->clk = clk_get(&adev->dev, NULL); if (IS_ERR(pl022->clk)) { diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index 3c9ade6..d95a54e 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c @@ -21,6 +21,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -1012,8 +1014,7 @@ static int __init au1550_spi_init(void) if (usedma) { ddma_memid = au1xxx_ddma_add_device(&au1550_spi_mem_dbdev); if (!ddma_memid) - printk(KERN_ERR "au1550-spi: cannot add memory" - "dbdma device\n"); + pr_err("cannot add memory dbdma device\n"); } return platform_driver_probe(&au1550_spi_drv, au1550_spi_probe); } diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c index d256cb0..c5d15d4 100644 --- a/drivers/spi/dw_spi.c +++ b/drivers/spi/dw_spi.c @@ -490,8 +490,8 @@ static void pump_transfers(unsigned long data) if (transfer->speed_hz != speed) { speed = transfer->speed_hz; if (speed > dws->max_freq) { - printk(KERN_ERR "MRST SPI0: unsupported" - "freq: %dHz\n", speed); + pr_err("MRST SPI0: unsupported freq: %dHz\n", + speed); message->status = -EIO; goto early_exit; } @@ -525,7 +525,7 @@ static void pump_transfers(unsigned long data) u16_writer : null_writer; break; default: - printk(KERN_ERR "MRST SPI0: unsupported bits:" + pr_err("MRST SPI0: unsupported bits:" "%db\n", bits); message->status = -EIO; goto early_exit; diff --git a/drivers/spi/dw_spi_pci.c b/drivers/spi/dw_spi_pci.c index 1f52755..35f1811 100644 --- a/drivers/spi/dw_spi_pci.c +++ b/drivers/spi/dw_spi_pci.c @@ -38,7 +38,7 @@ static int __devinit spi_pci_probe(struct pci_dev *pdev, int pci_bar = 0; int ret; - printk(KERN_INFO "DW: found PCI SPI controller(ID: %04x:%04x)\n", + pr_info("DW: found PCI SPI controller(ID: %04x:%04x)\n", pdev->vendor, pdev->device); ret = pci_enable_device(pdev); diff --git a/drivers/spi/omap_spi_100k.c b/drivers/spi/omap_spi_100k.c index 9bd1c92..b8b23f2 100644 --- a/drivers/spi/omap_spi_100k.c +++ b/drivers/spi/omap_spi_100k.c @@ -425,7 +425,7 @@ static void omap1_spi100k_work(struct work_struct *work) spin_unlock_irq(&spi100k->lock); if (status < 0) - printk(KERN_WARNING "spi transfer failed with %d\n", status); + pr_warning("spi transfer failed with %d\n", status); } static int omap1_spi100k_transfer(struct spi_device *spi, struct spi_message *m) diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c index 160d326..445a454 100644 --- a/drivers/spi/omap_uwire.c +++ b/drivers/spi/omap_uwire.c @@ -154,8 +154,7 @@ static int wait_uwire_csr_flag(u16 mask, u16 val, int might_not_catch) if ((w & mask) == val) break; if (time_after(jiffies, max_jiffies)) { - printk(KERN_ERR "%s: timeout. reg=%#06x " - "mask=%#06x val=%#06x\n", + pr_err("%s: timeout. reg=%#06x mask=%#06x val=%#06x\n", __func__, w, mask, val); return -1; } diff --git a/drivers/spi/spi_lm70llp.c b/drivers/spi/spi_lm70llp.c index 7746a41..ac3a13d 100644 --- a/drivers/spi/spi_lm70llp.c +++ b/drivers/spi/spi_lm70llp.c @@ -18,6 +18,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -202,9 +204,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_warning("instance already loaded. Aborting\n"); return; } @@ -252,9 +252,8 @@ 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_warning("spi_bitbang_start failed with status %d\n", + status); goto out_off_and_release; } @@ -277,14 +276,14 @@ static void spi_lm70llp_attach(struct parport *p) */ pp->info.controller_data = pp; pp->spidev_lm70 = spi_new_device(pp->bitbang.master, &pp->info); - if (pp->spidev_lm70) - 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); + if (!pp->spidev_lm70) { + pr_warning("spi_new_device failed\n"); status = -ENODEV; goto out_bitbang_stop; } + dev_dbg(&pp->spidev_lm70->dev, "spidev_lm70 at %s\n", + dev_name(&pp->spidev_lm70->dev)); + pp->spidev_lm70->bits_per_word = 8; lm70llp = pp; @@ -302,7 +301,7 @@ out_parport_unreg: out_free_master: (void) spi_master_put(master); out_fail: - pr_info("%s: spi_lm70llp probe fail, status %d\n", DRVNAME, status); + pr_info("probe fail, status %d\n", status); } static void spi_lm70llp_detach(struct parport *p)