Eliminate the device_names they are only used for debug
messages. Add paren's for one expression.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
--- a/drivers/input/misc/apanel.c 2007-10-25 09:20:23.000000000 -0700
+++ b/drivers/input/misc/apanel.c 2007-10-25 12:07:00.000000000 -0700
@@ -27,7 +27,7 @@
#include <linux/leds.h>
#define APANEL_NAME "Fujitsu Application Panel"
-#define APANEL_VERSION "1.3"
+#define APANEL_VERSION "1.3.1"
#define APANEL "apanel"
/* How often we poll keys - msecs */
@@ -40,6 +40,7 @@ enum apanel_devid {
APANEL_DEV_CDBTN = 2,
APANEL_DEV_LCD = 3,
APANEL_DEV_LED = 4,
+
APANEL_DEV_MAX,
};
@@ -53,14 +54,6 @@ enum apanel_chip {
/* Result of BIOS snooping/probing -- what features are supported */
static enum apanel_chip device_chip[APANEL_DEV_MAX];
-/* names for APANEL_XXX */
-static const char *device_names[APANEL_DEV_MAX] __initdata = {
- [APANEL_DEV_APPBTN] = "Application Buttons",
- [APANEL_DEV_LCD] = "LCD",
- [APANEL_DEV_LED] = "LED",
- [APANEL_DEV_CDBTN] = "CD Buttons",
-};
-
#define MAX_PANEL_KEYS 12
struct apanel {
@@ -123,7 +116,7 @@ static void apanel_poll(struct input_pol
dev_dbg(&ipdev->input->dev, APANEL ": data %#x\n", data);
for (i = 0; i < ipdev->input->keycodemax; i++)
- if (1ul << i & data)
+ if ((1u << i) & data)
report_key(idev, ap->keymap[i]);
}
@@ -366,17 +359,14 @@ static int __init apanel_init(void)
}
if (devno >= APANEL_DEV_MAX)
- pr_notice(APANEL ": unknown device %d found\n", devno);
+ pr_notice(APANEL ": unknown device %u found\n", devno);
else if (device_chip[devno] != CHIP_NONE)
- pr_warning(APANEL ": duplicate entry for %s\n",
- device_names[devno]);
+ pr_warning(APANEL ": duplicate entry for devno %u\n", devno);
else if (method != 1 && method != 2 && method != 4) {
- pr_notice(APANEL ": unknown method %u for %s\n",
- method, device_names[devno]);
+ pr_notice(APANEL ": unknown method %u for devno %u\n",
+ method, devno);
} else {
- pr_debug(APANEL ": %s found.\n", device_names[devno]);
-
device_chip[devno] = (enum apanel_chip) chip;
++found;
}
-
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Andrew Morton | -mm merge plans for 2.6.23 |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| PJ Waskiewicz | [ANNOUNCE] ixgbe: Data Center Bridging (DCB) support for ixgbe |
| David Miller | Re: [GIT]: Networking |
