Remove prefixes from printks and convert to pr_fmt/pr_<level>. Always make output prefix match module name. There are some existing uses that do not. For instance: spaceorb used "input: " once, probably a copy/paste error, newtonkbd as well. Synaptics used "serio: ", etc. A few miscellaneous typos corrected. Converted a few uses of usb macros err to pr_err. Compiled x86 only, some files not compile tested Signed-off-by: Joe Perches <joe@perches.com> --- drivers/input/apm-power.c | 14 ++--- drivers/input/evbug.c | 18 ++++--- drivers/input/evdev.c | 15 +++--- drivers/input/ff-core.c | 6 +- drivers/input/ff-memless.c | 8 ++-- drivers/input/gameport/emu10k1-gp.c | 4 +- drivers/input/gameport/fm801-gp.c | 8 ++- drivers/input/gameport/lightning.c | 6 ++- drivers/input/gameport/ns558.c | 8 ++- drivers/input/input-polldev.c | 5 +- drivers/input/input.c | 22 ++++---- drivers/input/joydev.c | 4 +- drivers/input/joystick/a3d.c | 9 ++- drivers/input/joystick/adi.c | 12 +++-- drivers/input/joystick/amijoy.c | 4 +- drivers/input/joystick/analog.c | 15 +++-- drivers/input/joystick/cobra.c | 7 ++- drivers/input/joystick/db9.c | 16 +++--- drivers/input/joystick/gf2k.c | 7 ++- drivers/input/joystick/grip_mp.c | 15 +++-- drivers/input/joystick/guillemot.c | 11 +++- drivers/input/joystick/iforce/iforce-packets.c | 8 ++- drivers/input/joystick/interact.c | 7 ++- drivers/input/joystick/joydump.c | 40 ++++++++------- drivers/input/joystick/sidewinder.c | 58 ++++++++++++---------- ...
Hi Joe, Thanks for doing this, however instead of using pr_xxx() I'd like drivers that are integrated in driver model (serio, usb, gameport, etc, i.e. when we have 'struct device' available, exept for psmouse) to use That would make synaptics messages to come as "psmouse", right? I think we shoudl use #define pr_fmt(fmt) "synaptics: " fmt here and in the rest of specialized PS/2 protocol handlers. Thanks. -- Dmitry --
These files? $ grep -rPl --include=*.[ch] "\bstruct\s+device\b" drivers/input | \ xargs grep -wl pr_fmt drivers/input/keyboard/omap-keypad.c drivers/input/mousedev.c drivers/input/serio/serio.c drivers/input/serio/i8042.c drivers/input/evdev.c drivers/input/joydev.c drivers/input/gameport/gameport.c drivers/input/touchscreen/htcpen.c drivers/input/input-polldev.c drivers/input/input.c drivers/input/tablet/aiptek.c drivers/input/misc/winbond-cir.c drivers/input/misc/yealink.c drivers/input/misc/ati_remote2.c drivers/input/misc/wistron_btns.c drivers/input/misc/ati_remote.c Perhaps convert to what elantech uses #define pr_fmt(fmt) KBUILD_BASENAME ": " fmt $ grep -l "define pr_fmt" drivers/input/mouse/*.[ch] | \ xargs grep -il "ps2" drivers/input/mouse/alps.c drivers/input/mouse/elantech.c drivers/input/mouse/lifebook.c drivers/input/mouse/logips2pp.c drivers/input/mouse/psmouse-base.c drivers/input/mouse/sentelic.c drivers/input/mouse/synaptics.c drivers/input/mouse/trackpoint.c Which ones do you want converted? Any others? --
There should be more. USB for example. Basically anything but very old psmouse-base should use KBUILD_MODNAME, for the rest of these No, I think this is it as far as PS/2 mice go. -- Dmitry --
I propose you take the patch as-is and then conversions from pr_<level>(...) to dev_<level>(struct device *, ...) OK, done. Do you want a diff from the original, a new single patch or patches by directory? ie: drivers/input/gameport drivers/input/joystick drivers/input/keyboard drivers/input/misc drivers/input/mouse drivers/input/serio drivers/input/tablet drivers/input/touchscreen drivers/input --
Split by directories, if possible, please. -- Dmitry --
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/input/tablet/acecad.c | 5 +++--
drivers/input/tablet/aiptek.c | 7 ++++---
drivers/input/tablet/gtco.c | 2 +-
drivers/input/tablet/kbtab.c | 5 +++--
drivers/input/tablet/wacom_sys.c | 7 ++++---
drivers/input/tablet/wacom_wac.c | 8 ++++++--
6 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c
index aea9a93..bf95597 100644
--- a/drivers/input/tablet/acecad.c
+++ b/drivers/input/tablet/acecad.c
@@ -25,6 +25,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
@@ -272,8 +274,7 @@ static int __init usb_acecad_init(void)
{
int result = usb_register(&usb_acecad_driver);
if (result == 0)
- printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
- DRIVER_DESC "\n");
+ pr_info(DRIVER_VERSION ":" DRIVER_DESC "\n");
return result;
}
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 57b25b8..11f1c09 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -70,6 +70,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -1924,9 +1926,8 @@ static int __init aiptek_init(void)
{
int result = usb_register(&aiptek_driver);
if (result == 0) {
- printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
- DRIVER_DESC "\n");
- printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_AUTHOR "\n");
+ pr_info(DRIVER_VERSION ":" DRIVER_DESC "\n");
+ pr_info(DRIVER_AUTHOR "\n");
}
return result;
}
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c
index 8ea6afe..822941f 100644
--- a/drivers/input/tablet/gtco.c
+++ b/drivers/input/tablet/gtco.c
@@ -1035,7 ...Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/input/gameport/emu10k1-gp.c | 4 +++-
drivers/input/gameport/fm801-gp.c | 8 +++++---
drivers/input/gameport/lightning.c | 6 ++++--
drivers/input/gameport/ns558.c | 8 +++++---
4 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c
index 7392992..3b065c7 100644
--- a/drivers/input/gameport/emu10k1-gp.c
+++ b/drivers/input/gameport/emu10k1-gp.c
@@ -26,6 +26,8 @@
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <asm/io.h>
#include <linux/module.h>
@@ -75,7 +77,7 @@ static int __devinit emu_probe(struct pci_dev *pdev, const struct pci_device_id
emu = kzalloc(sizeof(struct emu), GFP_KERNEL);
port = gameport_allocate_port();
if (!emu || !port) {
- printk(KERN_ERR "emu10k1-gp: Memory allocation failed\n");
+ pr_err("Memory allocation failed\n");
release_region(ioport, iolen);
kfree(emu);
gameport_free_port(port);
diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c
index 14d3f3e..9f8b4fa 100644
--- a/drivers/input/gameport/fm801-gp.c
+++ b/drivers/input/gameport/fm801-gp.c
@@ -20,6 +20,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <asm/io.h>
#include <linux/delay.h>
#include <linux/errno.h>
@@ -87,7 +89,7 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
gp = kzalloc(sizeof(struct fm801_gp), GFP_KERNEL);
port = gameport_allocate_port();
if (!gp || !port) {
- printk(KERN_ERR "fm801-gp: Memory allocation failed\n");
+ pr_err("Memory allocation failed\n");
error = -ENOMEM;
goto err_out_free;
}
@@ -108,8 +110,8 @@ static int __devinit fm801_gp_probe(struct pci_dev *pci, const struct pci_device
gp->gameport = port;
gp->res_port = request_region(port->io, 0x10, "FM801 GP");
if (!gp->res_port) ...Convert some bare printks to pr_cont
Add argument checking to non-debug #define dbg
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/input/joystick/a3d.c | 9 +++-
drivers/input/joystick/adi.c | 12 +++--
drivers/input/joystick/amijoy.c | 4 +-
drivers/input/joystick/analog.c | 15 ++++---
drivers/input/joystick/cobra.c | 7 ++-
drivers/input/joystick/db9.c | 16 ++++---
drivers/input/joystick/gf2k.c | 7 ++-
drivers/input/joystick/grip_mp.c | 15 ++++---
drivers/input/joystick/guillemot.c | 11 +++-
drivers/input/joystick/iforce/iforce-packets.c | 8 ++-
drivers/input/joystick/interact.c | 7 ++-
drivers/input/joystick/joydump.c | 40 +++++++++-------
drivers/input/joystick/sidewinder.c | 58 +++++++++++++-----------
drivers/input/joystick/spaceball.c | 6 ++-
drivers/input/joystick/spaceorb.c | 15 ++++--
drivers/input/joystick/turbografx.c | 16 ++++---
drivers/input/joystick/walkera0701.c | 6 ++-
drivers/input/joystick/xpad.c | 4 +-
18 files changed, 156 insertions(+), 100 deletions(-)
diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c
index d259b41..73d897b 100644
--- a/drivers/input/joystick/a3d.c
+++ b/drivers/input/joystick/a3d.c
@@ -26,6 +26,8 @@
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
@@ -295,8 +297,9 @@ static int a3d_connect(struct gameport *gameport, struct gameport_driver *drv)
a3d->mode = data[0];
if (!a3d->mode || a3d->mode > 5) {
- printk(KERN_WARNING "a3d.c: Unknown A3D device detected "
- "(%s, id=%d), contact <vojtech@ucw.cz>\n", gameport->phys, ...Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/input/apm-power.c | 14 ++++++--------
drivers/input/evbug.c | 18 ++++++++++--------
drivers/input/evdev.c | 15 ++++++++-------
drivers/input/ff-core.c | 6 +++---
drivers/input/ff-memless.c | 8 ++++----
drivers/input/input-polldev.c | 5 +++--
drivers/input/input.c | 22 +++++++++++-----------
drivers/input/joydev.c | 4 +++-
drivers/input/mousedev.c | 10 ++++++----
drivers/input/xen-kbdfront.c | 10 +++++-----
10 files changed, 59 insertions(+), 53 deletions(-)
diff --git a/drivers/input/apm-power.c b/drivers/input/apm-power.c
index 7d61a96..e90ee3d 100644
--- a/drivers/input/apm-power.c
+++ b/drivers/input/apm-power.c
@@ -9,6 +9,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/input.h>
#include <linux/slab.h>
@@ -23,8 +25,7 @@ static void system_power_event(unsigned int keycode)
switch (keycode) {
case KEY_SUSPEND:
apm_queue_event(APM_USER_SUSPEND);
-
- printk(KERN_INFO "apm-power: Requesting system suspend...\n");
+ pr_info("Requesting system suspend...\n");
break;
default:
break;
@@ -65,18 +66,15 @@ static int apmpower_connect(struct input_handler *handler,
error = input_register_handle(handle);
if (error) {
- printk(KERN_ERR
- "apm-power: Failed to register input power handler, "
- "error %d\n", error);
+ pr_err("Failed to register input power handler, error %d\n",
+ error);
kfree(handle);
return error;
}
error = input_open_device(handle);
if (error) {
- printk(KERN_ERR
- "apm-power: Failed to open input power device, "
- "error %d\n", error);
+ pr_err("Failed to open input power device, error %d\n", error);
input_unregister_handle(handle);
kfree(handle);
return error;
diff --git a/drivers/input/evbug.c b/drivers/input/evbug.c
index f7c5c14..cd4e667 100644
--- ...Remove prefixes from printks and convert to pr_fmt/pr_<level>. Always make output prefix match module name. There are some existing uses that do not. For instance: spaceorb used "input: " once, probably a copy/paste error, newtonkbd as well. Synaptics used "serio: ", etc. A few miscellaneous typos corrected. Converted a few uses of usb macros err to pr_err. Compiled x86 only, some files not compile tested Joe Perches (9): drivers/input/gameport: Use pr_fmt and pr_<level> drivers/input/joystick: Use pr_fmt and pr_<level> drivers/input/keyboard: Use pr_fmt and pr_<level> drivers/input/misc: Use pr_fmt and pr_<level> drivers/input/mouse: Use pr_fmt and pr_<level> drivers/input/serio: Use pr_fmt and pr_<level> drivers/input/tablet: Use pr_fmt and pr_<level> drivers/input/touchscreen: Use pr_fmt and pr_<level> drivers/input: Use pr_fmt and pr_<level> drivers/input/apm-power.c | 14 ++--- drivers/input/evbug.c | 18 ++++--- drivers/input/evdev.c | 15 +++--- drivers/input/ff-core.c | 6 +- drivers/input/ff-memless.c | 8 ++-- drivers/input/gameport/emu10k1-gp.c | 4 +- drivers/input/gameport/fm801-gp.c | 8 ++- drivers/input/gameport/lightning.c | 6 ++- drivers/input/gameport/ns558.c | 8 ++- drivers/input/input-polldev.c | 5 +- drivers/input/input.c | 22 ++++---- drivers/input/joydev.c | 4 +- drivers/input/joystick/a3d.c | 9 ++- drivers/input/joystick/adi.c | 12 +++-- drivers/input/joystick/amijoy.c | 4 +- drivers/input/joystick/analog.c | 15 +++-- drivers/input/joystick/cobra.c | 7 ++- drivers/input/joystick/db9.c | 16 +++--- drivers/input/joystick/gf2k.c ...
ps2 related drivers use #define pr_fmt(fmt) KBUILD_BASENAME ": " fmt
all others use #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Add argument checking to dbg macro
Convert bare printks to pr_cont
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/input/mouse/alps.c | 12 ++++---
drivers/input/mouse/appletouch.c | 64 +++++++++++++++++------------------
drivers/input/mouse/bcm5974.c | 48 +++++++++++++--------------
drivers/input/mouse/elantech.c | 4 +-
drivers/input/mouse/inport.c | 8 +++--
drivers/input/mouse/lifebook.c | 5 ++-
drivers/input/mouse/logibm.c | 10 +++--
drivers/input/mouse/logips2pp.c | 13 ++++---
drivers/input/mouse/pc110pad.c | 10 +++--
drivers/input/mouse/psmouse-base.c | 52 +++++++++++++++--------------
drivers/input/mouse/rpcmouse.c | 4 ++-
drivers/input/mouse/sentelic.c | 13 ++++---
drivers/input/mouse/sermouse.c | 6 ++-
drivers/input/mouse/synaptics.c | 30 +++++++++--------
drivers/input/mouse/trackpoint.c | 10 +++---
drivers/input/mouse/vsxxxaa.c | 44 ++++++++++++-------------
16 files changed, 174 insertions(+), 159 deletions(-)
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 99d5876..bc2bde3 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -15,6 +15,8 @@
* the Free Software Foundation.
*/
+#define pr_fmt(fmt) KBUILD_BASENAME ": " fmt
+
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/serio.h>
@@ -25,9 +27,9 @@
#undef DEBUG
#ifdef DEBUG
-#define dbg(format, arg...) printk(KERN_INFO "alps.c: " format "\n", ## arg)
+#define dbg(format, arg...) pr_info(format "\n", ##arg)
#else
-#define dbg(format, arg...) do {} while (0)
+#define dbg(format, arg...) do { if (0) pr_info(format "\n", ##arg); } while (0)
#endif
#define ALPS_OLDPROTO 0x01 /* old style input */
@@ -605,12 +607,12 @@ static int alps_hw_init(struct psmouse *psmouse)
...Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/input/touchscreen/gunze.c | 5 ++++-
drivers/input/touchscreen/h3600_ts_input.c | 8 +++++---
drivers/input/touchscreen/hp680_ts_input.c | 3 +--
drivers/input/touchscreen/htcpen.c | 15 +++++++--------
drivers/input/touchscreen/inexio.c | 5 ++++-
drivers/input/touchscreen/jornada720_ts.c | 4 +++-
drivers/input/touchscreen/mk712.c | 10 ++++++----
drivers/input/touchscreen/mtouch.c | 7 +++++--
drivers/input/touchscreen/ucb1400_ts.c | 12 +++++++-----
drivers/input/touchscreen/usbtouchscreen.c | 6 ++++--
10 files changed, 46 insertions(+), 29 deletions(-)
diff --git a/drivers/input/touchscreen/gunze.c b/drivers/input/touchscreen/gunze.c
index a54f90e..064765c4 100644
--- a/drivers/input/touchscreen/gunze.c
+++ b/drivers/input/touchscreen/gunze.c
@@ -26,6 +26,8 @@
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -64,7 +66,8 @@ static void gunze_process_packet(struct gunze* gunze)
if (gunze->idx != GUNZE_MAX_LENGTH || gunze->data[5] != ',' ||
(gunze->data[0] != 'T' && gunze->data[0] != 'R')) {
- printk(KERN_WARNING "gunze.c: bad packet: >%.*s<\n", GUNZE_MAX_LENGTH, gunze->data);
+ pr_warning("bad packet: >%.*s<\n",
+ GUNZE_MAX_LENGTH, gunze->data);
return;
}
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c
index b4d7f63..58a97f7 100644
--- a/drivers/input/touchscreen/h3600_ts_input.c
+++ b/drivers/input/touchscreen/h3600_ts_input.c
@@ -29,6 +29,8 @@
* e-mail - mail your message to <jsimmons@transvirtual.com>.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -331,7 +333,7 @@ static irqreturn_t ...Add argument checking to #define dbg
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/input/serio/ambakmi.c | 5 ++-
drivers/input/serio/ct82c710.c | 10 +++--
drivers/input/serio/gscps2.c | 15 ++++----
drivers/input/serio/hil_mlc.c | 17 ++++-----
drivers/input/serio/hp_sdc.c | 53 ++++++++++++++--------------
drivers/input/serio/hp_sdc_mlc.c | 45 +++++++++++++-----------
drivers/input/serio/i8042-x86ia64io.h | 43 ++++++++++------------
drivers/input/serio/i8042.c | 62 +++++++++++++++------------------
drivers/input/serio/i8042.h | 21 +++++++----
drivers/input/serio/maceps2.c | 5 ++-
drivers/input/serio/parkbd.c | 8 +++--
drivers/input/serio/q40kbd.c | 6 ++-
drivers/input/serio/rpckbd.c | 6 ++-
drivers/input/serio/sa1111ps2.c | 17 +++++----
drivers/input/serio/serio_raw.c | 10 +++--
drivers/input/serio/serport.c | 6 ++-
16 files changed, 175 insertions(+), 154 deletions(-)
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c
index 92563a6..ce02f59 100644
--- a/drivers/input/serio/ambakmi.c
+++ b/drivers/input/serio/ambakmi.c
@@ -9,6 +9,9 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
+
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/init.h>
#include <linux/serio.h>
@@ -82,7 +85,7 @@ static int amba_kmi_open(struct serio *io)
ret = request_irq(kmi->irq, amba_kmi_int, 0, "kmi-pl050", kmi);
if (ret) {
- printk(KERN_ERR "kmi: failed to claim IRQ%d\n", kmi->irq);
+ pr_err("failed to claim IRQ%d\n", kmi->irq);
writeb(0, KMICR);
goto clk_disable;
}
diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c
index 4a30846..3c5de1d 100644
--- a/drivers/input/serio/ct82c710.c
+++ b/drivers/input/serio/ct82c710.c
@@ -26,6 ...Fixup #define dbginfo
Remove #define err, use pr_err
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/input/misc/ati_remote.c | 22 ++++++++++++----------
drivers/input/misc/ati_remote2.c | 6 ++++--
drivers/input/misc/cm109.c | 23 +++++++++--------------
drivers/input/misc/hp_sdc_rtc.c | 10 ++++++----
drivers/input/misc/m68kspkr.c | 4 +++-
drivers/input/misc/powermate.c | 19 +++++++++++--------
drivers/input/misc/uinput.c | 25 ++++++++++++++-----------
drivers/input/misc/winbond-cir.c | 6 ++++--
drivers/input/misc/wistron_btns.c | 29 +++++++++++++++--------------
drivers/input/misc/yealink.c | 5 +++--
10 files changed, 81 insertions(+), 68 deletions(-)
diff --git a/drivers/input/misc/ati_remote.c b/drivers/input/misc/ati_remote.c
index bce5712..c705ac0 100644
--- a/drivers/input/misc/ati_remote.c
+++ b/drivers/input/misc/ati_remote.c
@@ -85,6 +85,8 @@
*
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
@@ -139,9 +141,11 @@ static int repeat_delay = REPEAT_DELAY;
module_param(repeat_delay, int, 0644);
MODULE_PARM_DESC(repeat_delay, "Delay before sending repeats, default = 500 msec");
-#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev , format , ## arg); } while (0)
-#undef err
-#define err(format, arg...) printk(KERN_ERR format , ## arg)
+#define dbginfo(dev, format, arg...) \
+do { \
+ if (debug) \
+ dev_info(dev, format, ##arg); \
+} while (0)
static struct usb_device_id ati_remote_table[] = {
{ USB_DEVICE(ATI_REMOTE_VENDOR_ID, LOLA_REMOTE_PRODUCT_ID) },
@@ -738,7 +742,7 @@ static int ati_remote_probe(struct usb_interface *interface, const struct usb_de
int err = -ENOMEM;
if (iface_host->desc.bNumEndpoints != 2) {
- err("%s: Unexpected desc.bNumEndpoints\n", __func__);
+ pr_err("%s: Unexpected desc.bNumEndpoints\n", __func__);
return -ENODEV;
}
@@ ...Move error messages from array to direct uses.
Convert bare printks to pr_cont
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/input/keyboard/amikbd.c | 42 ++++++++++++++++-------
drivers/input/keyboard/atakbd.c | 4 ++-
drivers/input/keyboard/hil_kbd.c | 21 +++++-------
drivers/input/keyboard/hilkbd.c | 26 ++++++++-------
drivers/input/keyboard/jornada680_kbd.c | 5 ++-
drivers/input/keyboard/jornada720_kbd.c | 10 +++--
drivers/input/keyboard/lkkbd.c | 54 +++++++++++++++----------------
drivers/input/keyboard/locomokbd.c | 6 ++-
drivers/input/keyboard/newtonkbd.c | 4 ++-
drivers/input/keyboard/omap-keypad.c | 25 +++++++-------
drivers/input/keyboard/sunkbd.c | 9 +++--
drivers/input/keyboard/xtkbd.c | 7 +++-
12 files changed, 119 insertions(+), 94 deletions(-)
diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c
index 79172af..61f92a5 100644
--- a/drivers/input/keyboard/amikbd.c
+++ b/drivers/input/keyboard/amikbd.c
@@ -29,6 +29,8 @@
* Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
@@ -144,17 +146,6 @@ static unsigned char amikbd_keycode[0x78] __initdata = {
[103] = KEY_RIGHTMETA
};
-static const char *amikbd_messages[8] = {
- [0] = KERN_ALERT "amikbd: Ctrl-Amiga-Amiga reset warning!!\n",
- [1] = KERN_WARNING "amikbd: keyboard lost sync\n",
- [2] = KERN_WARNING "amikbd: keyboard buffer overflow\n",
- [3] = KERN_WARNING "amikbd: keyboard controller failure\n",
- [4] = KERN_ERR "amikbd: keyboard selftest failure\n",
- [5] = KERN_INFO "amikbd: initiate power-up key stream\n",
- [6] = KERN_INFO "amikbd: terminate power-up key stream\n",
- [7] = KERN_WARNING "amikbd: keyboard interrupt\n"
-};
-
static irqreturn_t amikbd_interrupt(int irq, void *data)
{
struct ...