Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b4a8dd2 authored by Adrian Bunk's avatar Adrian Bunk Committed by Paul Mackerras
Browse files

drivers/macintosh: Various cleanups



This contains the following cleanups:
- make the following needlessly global code static:
  - adb.c: adb_controller
  - adb.c: adb_init()
  - adbhid.c: adb_to_linux_keycodes[]  (also make it const)
  - via-pmu68k.c: backlight_level
  - via-pmu68k.c: backlight_enabled
- remove the following unused code:
  - via-pmu68k.c: sleep_notifier_list

Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent f0c426bc
Loading
Loading
Loading
Loading
+2 −3
Original line number Original line Diff line number Diff line
@@ -46,7 +46,6 @@
#endif
#endif




EXPORT_SYMBOL(adb_controller);
EXPORT_SYMBOL(adb_client_list);
EXPORT_SYMBOL(adb_client_list);


extern struct adb_driver via_macii_driver;
extern struct adb_driver via_macii_driver;
@@ -80,7 +79,7 @@ static struct adb_driver *adb_driver_list[] = {


static struct class *adb_dev_class;
static struct class *adb_dev_class;


struct adb_driver *adb_controller;
static struct adb_driver *adb_controller;
BLOCKING_NOTIFIER_HEAD(adb_client_list);
BLOCKING_NOTIFIER_HEAD(adb_client_list);
static int adb_got_sleep;
static int adb_got_sleep;
static int adb_inited;
static int adb_inited;
@@ -290,7 +289,7 @@ static int adb_resume(struct platform_device *dev)
}
}
#endif /* CONFIG_PM */
#endif /* CONFIG_PM */


int __init adb_init(void)
static int __init adb_init(void)
{
{
	struct adb_driver *driver;
	struct adb_driver *driver;
	int i;
	int i;
+1 −1
Original line number Original line Diff line number Diff line
@@ -75,7 +75,7 @@ static struct notifier_block adbhid_adb_notifier = {
#define ADB_KEY_POWER_OLD	0x7e
#define ADB_KEY_POWER_OLD	0x7e
#define ADB_KEY_POWER		0x7f
#define ADB_KEY_POWER		0x7f


u16 adb_to_linux_keycodes[128] = {
static const u16 adb_to_linux_keycodes[128] = {
	/* 0x00 */ KEY_A, 		/*  30 */
	/* 0x00 */ KEY_A, 		/*  30 */
	/* 0x01 */ KEY_S, 		/*  31 */
	/* 0x01 */ KEY_S, 		/*  31 */
	/* 0x02 */ KEY_D,		/*  32 */
	/* 0x02 */ KEY_D,		/*  32 */
+2 −3
Original line number Original line Diff line number Diff line
@@ -101,7 +101,6 @@ static int pmu_kind = PMU_UNKNOWN;
static int pmu_fully_inited;
static int pmu_fully_inited;


int asleep;
int asleep;
BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);


static int pmu_probe(void);
static int pmu_probe(void);
static int pmu_init(void);
static int pmu_init(void);
@@ -741,8 +740,8 @@ pmu_handle_data(unsigned char *data, int len)
	}
	}
}
}


int backlight_level = -1;
static int backlight_level = -1;
int backlight_enabled = 0;
static int backlight_enabled = 0;


#define LEVEL_TO_BRIGHT(lev)	((lev) < 1? 0x7f: 0x4a - ((lev) << 1))
#define LEVEL_TO_BRIGHT(lev)	((lev) < 1? 0x7f: 0x4a - ((lev) << 1))


+0 −1
Original line number Original line Diff line number Diff line
@@ -84,7 +84,6 @@ enum adb_message {
    ADB_MSG_PRE_RESET,	/* Called before resetting the bus */
    ADB_MSG_PRE_RESET,	/* Called before resetting the bus */
    ADB_MSG_POST_RESET	/* Called after resetting the bus (re-do init & register) */
    ADB_MSG_POST_RESET	/* Called after resetting the bus (re-do init & register) */
};
};
extern struct adb_driver *adb_controller;
extern struct blocking_notifier_head adb_client_list;
extern struct blocking_notifier_head adb_client_list;


int adb_request(struct adb_request *req, void (*done)(struct adb_request *),
int adb_request(struct adb_request *req, void (*done)(struct adb_request *),