aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/w1/w1_int.c
diff options
context:
space:
mode:
authorFjodor Schelichow <fjodor.schelichow@hotmail.com>2014-06-18 20:52:00 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-19 20:46:51 -0400
commitfdc9167a7853523647ed0b19d719256c56f1f685 (patch)
tree431a7d7bbf787fa82ff1f6ac99027d989c3ddd5d /drivers/w1/w1_int.c
parentea022eac1e297bbf725c1e484726b4c8fb09dd80 (diff)
w1: use pr_* instead of printk
This patch replaces all calls to the "printk" function within the main "w1" directory by calls to the appropriate "pr_*" function thus addressing the following warning generated by the checkpatch script: WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... Signed-off-by: Fjodor Schelichow <fjodor.schelichow@hotmail.com> Signed-off-by: Roman Sommer <romsom2@yahoo.de> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1/w1_int.c')
-rw-r--r--drivers/w1/w1_int.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/w1/w1_int.c b/drivers/w1/w1_int.c
index dfb6644028c0..47249a30eae3 100644
--- a/drivers/w1/w1_int.c
+++ b/drivers/w1/w1_int.c
@@ -50,8 +50,7 @@ static struct w1_master *w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
50 */ 50 */
51 dev = kzalloc(sizeof(struct w1_master) + sizeof(struct w1_bus_master), GFP_KERNEL); 51 dev = kzalloc(sizeof(struct w1_master) + sizeof(struct w1_bus_master), GFP_KERNEL);
52 if (!dev) { 52 if (!dev) {
53 printk(KERN_ERR 53 pr_err("Failed to allocate %zd bytes for new w1 device.\n",
54 "Failed to allocate %zd bytes for new w1 device.\n",
55 sizeof(struct w1_master)); 54 sizeof(struct w1_master));
56 return NULL; 55 return NULL;
57 } 56 }
@@ -91,7 +90,7 @@ static struct w1_master *w1_alloc_dev(u32 id, int slave_count, int slave_ttl,
91 90
92 err = device_register(&dev->dev); 91 err = device_register(&dev->dev);
93 if (err) { 92 if (err) {
94 printk(KERN_ERR "Failed to register master device. err=%d\n", err); 93 pr_err("Failed to register master device. err=%d\n", err);
95 memset(dev, 0, sizeof(struct w1_master)); 94 memset(dev, 0, sizeof(struct w1_master));
96 kfree(dev); 95 kfree(dev);
97 dev = NULL; 96 dev = NULL;
@@ -120,7 +119,7 @@ int w1_add_master_device(struct w1_bus_master *master)
120 if (!(master->touch_bit && master->reset_bus) && 119 if (!(master->touch_bit && master->reset_bus) &&
121 !(master->write_bit && master->read_bit) && 120 !(master->write_bit && master->read_bit) &&
122 !(master->write_byte && master->read_byte && master->reset_bus)) { 121 !(master->write_byte && master->read_byte && master->reset_bus)) {
123 printk(KERN_ERR "w1_add_master_device: invalid function set\n"); 122 pr_err("w1_add_master_device: invalid function set\n");
124 return(-EINVAL); 123 return(-EINVAL);
125 } 124 }
126 125
@@ -254,7 +253,7 @@ void w1_remove_master_device(struct w1_bus_master *bm)
254 } 253 }
255 254
256 if (!found) { 255 if (!found) {
257 printk(KERN_ERR "Device doesn't exist.\n"); 256 pr_err("Device doesn't exist.\n");
258 return; 257 return;
259 } 258 }
260 259