diff options
| author | Adrian Bunk <bunk@stusta.de> | 2005-01-07 22:22:28 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-07 22:22:28 -0800 |
| commit | a42bcfada35b86481d298806df969abfe60a82bb (patch) | |
| tree | 6e537da9fba6c32688c1dc72c6dd0a65964e86d9 | |
| parent | 3404c3c1a4a525f92a95ae946e9b3e3bc3a8f2e5 (diff) | |
[PATCH] small MCA cleanups
The patch below does the following cleanups in the MCA code:
- make some needlessly global code static
- remove three unused global functions from mca-legacy.c (two of them
were EXPORT_SYMBOL'ed); this should IMHO be safe since mca-legacy
is not an API drivers should move to
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | drivers/mca/mca-bus.c | 2 | ||||
| -rw-r--r-- | drivers/mca/mca-legacy.c | 59 | ||||
| -rw-r--r-- | drivers/mca/mca-proc.c | 4 | ||||
| -rw-r--r-- | include/linux/mca-legacy.h | 5 |
4 files changed, 3 insertions, 67 deletions
diff --git a/drivers/mca/mca-bus.c b/drivers/mca/mca-bus.c index a967aad59aab..ff9be67c2a15 100644 --- a/drivers/mca/mca-bus.c +++ b/drivers/mca/mca-bus.c @@ -34,7 +34,7 @@ /* Very few machines have more than one MCA bus. However, there are * those that do (Voyager 35xx/5xxx), so we do it this way for future * expansion. None that I know have more than 2 */ -struct mca_bus *mca_root_busses[MAX_MCA_BUSSES]; +static struct mca_bus *mca_root_busses[MAX_MCA_BUSSES]; #define MCA_DEVINFO(i,s) { .pos = i, .name = s } diff --git a/drivers/mca/mca-legacy.c b/drivers/mca/mca-legacy.c index 7c86071ea1f8..af56313ba0af 100644 --- a/drivers/mca/mca-legacy.c +++ b/drivers/mca/mca-legacy.c @@ -283,25 +283,6 @@ void mca_set_adapter_name(int slot, char* name) EXPORT_SYMBOL(mca_set_adapter_name); /** - * mca_get_adapter_name - get the adapter description - * @slot: slot to query - * - * Return the adapter description if set. If it has not been - * set or the slot is out range then return NULL. - */ - -char *mca_get_adapter_name(int slot) -{ - struct mca_device *mca_dev = mca_find_device_by_slot(slot); - - if(!mca_dev) - return NULL; - - return mca_device_get_name(mca_dev); -} -EXPORT_SYMBOL(mca_get_adapter_name); - -/** * mca_is_adapter_used - check if claimed by driver * @slot: slot to check * @@ -365,43 +346,3 @@ void mca_mark_as_unused(int slot) } EXPORT_SYMBOL(mca_mark_as_unused); -/** - * mca_isadapter - check if the slot holds an adapter - * @slot: slot to query - * - * Returns zero if the slot does not hold an adapter, non zero if - * it does. - */ - -int mca_isadapter(int slot) -{ - struct mca_device *mca_dev = mca_find_device_by_slot(slot); - enum MCA_AdapterStatus status; - - if(!mca_dev) - return 0; - - status = mca_device_status(mca_dev); - - return status == MCA_ADAPTER_NORMAL - || status == MCA_ADAPTER_DISABLED; -} -EXPORT_SYMBOL(mca_isadapter); - -/** - * mca_isenabled - check if the slot holds an enabled adapter - * @slot: slot to query - * - * Returns a non zero value if the slot holds an enabled adapter - * and zero for any other case. - */ - -int mca_isenabled(int slot) -{ - struct mca_device *mca_dev = mca_find_device_by_slot(slot); - - if(!mca_dev) - return 0; - - return mca_device_status(mca_dev) == MCA_ADAPTER_NORMAL; -} diff --git a/drivers/mca/mca-proc.c b/drivers/mca/mca-proc.c index e14ee89a4a07..33d5e0820cc5 100644 --- a/drivers/mca/mca-proc.c +++ b/drivers/mca/mca-proc.c @@ -43,8 +43,8 @@ static int get_mca_info_helper(struct mca_device *mca_dev, char *page, int len) return len; } -int get_mca_info(char *page, char **start, off_t off, - int count, int *eof, void *data) +static int get_mca_info(char *page, char **start, off_t off, + int count, int *eof, void *data) { int i, len = 0; diff --git a/include/linux/mca-legacy.h b/include/linux/mca-legacy.h index ae5d7bda2773..f2bb770e530a 100644 --- a/include/linux/mca-legacy.h +++ b/include/linux/mca-legacy.h @@ -34,10 +34,6 @@ extern int mca_find_adapter(int id, int start); extern int mca_find_unused_adapter(int id, int start); -/* adapter state info - returns 0 if no */ -extern int mca_isadapter(int slot); -extern int mca_isenabled(int slot); - extern int mca_is_adapter_used(int slot); extern int mca_mark_as_used(int slot); extern void mca_mark_as_unused(int slot); @@ -50,7 +46,6 @@ extern unsigned char mca_read_stored_pos(int slot, int reg); * so we can have a more interesting /proc/mca. */ extern void mca_set_adapter_name(int slot, char* name); -extern char* mca_get_adapter_name(int slot); /* These routines actually mess with the hardware POS registers. They * temporarily disable the device (and interrupts), so make sure you know |
