drivers/mmc/core/: make 4 functions static
PATCH 1/1 drivers/mmc/core/: make 4 functions static
This patch makes the following needlessly global functions static:
- sd_ops.c: mmc_app_cmd()
- sd_ops.c: mmc_wait_for_app_cmd()
- core.c: __mmc_release_bus()
- core.c: mmc_start_request()
---
drivers/mmc/core/core.c | 49 +++++++++++++++++++---------- drivers/mmc/core/core.h | 22 ------------- drivers/mmc/core/sd_ops.c | 64 ++++++++++++++++++-------------------- drivers/mmc/core/sd_ops.h | 1 include/linux/mmc/core.h | 2 - 5 files changed, 64 insertions(+), 74 deletions(-)
include/linux/mmc/core.h renamed from include/linux/mmc/core.h.old +0 -2
@@ -101,8 +101,6 @@extern int mmc_wait_for_req (struct mmc_host *,struct mmc_request *);extern int mmc_wait_for_cmd (struct mmc_host *,struct mmc_command *,int ); -extern int mmc_wait_for_app_cmd (struct mmc_host *,struct mmc_card *, -struct mmc_command *,int );extern void mmc_set_data_timeout (struct mmc_data *,const struct mmc_card *,int );
drivers/mmc/core/sd_ops.h renamed from drivers/mmc/core/sd_ops.h.old +0 -1
@@ -12,7 +12,6 @@#ifndef _MMC_SD_OPS_H#define _MMC_SD_OPS_H -int mmc_app_cmd (struct mmc_host *host,struct mmc_card *card);int mmc_app_set_bus_width (struct mmc_card *card,int width);int mmc_send_app_op_cond (struct mmc_host *host,u32 ocr,u32 *rocr);int mmc_send_if_cond (struct mmc_host *host,u32 ocr);
drivers/mmc/core/sd_ops.c renamed from drivers/mmc/core/sd_ops.c.old +31 -33
82 lines not on this page · raw message
drivers/mmc/core/core.h renamed from drivers/mmc/core/core.h.old +0 -22
@@ -25,28 +25,6 @@void mmc_attach_bus (struct mmc_host *host,const struct mmc_bus_ops *ops);void mmc_detach_bus (struct mmc_host *host); -void __mmc_release_bus (struct mmc_host *host); - -static inline void mmc_bus_get (struct mmc_host *host) -{ -unsigned long flags; - -spin_lock_irqsave (&host->lock, flags); - host->bus_refs++; -spin_unlock_irqrestore (&host->lock, flags); -} - -static inline void mmc_bus_put (struct mmc_host *host) -{ -unsigned long flags; - -spin_lock_irqsave (&host->lock, flags); - host->bus_refs--; -if ((host->bus_refs ==0 ) && host->bus_ops) -__mmc_release_bus (host); -spin_unlock_irqrestore (&host->lock, flags); -} -void mmc_set_chip_select (struct mmc_host *host,int mode);void mmc_set_clock (struct mmc_host *host,unsigned int hz);void mmc_set_bus_mode (struct mmc_host *host,unsigned int mode);
drivers/mmc/core/core.c renamed from drivers/mmc/core/core.c.old +33 -16
73 lines not on this page · raw message
Quoted 3 lines · On Fri, 13 Jul 2007 01:56:02 +0200 Adrian Bunk <[email protected]> wrote:
This patch makes the following needlessly global functions static:
-sd_ops.c:mmc_wait_for_app_cmd()
-core.c:mmc_start_request()
I am a bit torn about these two. Even though we don't cater to out-of-tree stuff, having these as exported symbols shows that they are part of the API. Removing them might risk people going about doing something silly because they don't know the functionality exists, and we might not spot it at patch review time.
Rgds
Signature · 5 lines
-- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org PulseAudio, core developer http://pulseaudio.org rdesktop, core developer http://www.rdesktop.org
Quoted 7 lines · Pierre Ossman
Quoted 3 lines · On Fri, 13 Jul 2007 01:56:02 +0200 Adrian Bunk <[email protected]> wrote:
This patch makes the following needlessly global functions static:
-sd_ops.c:mmc_wait_for_app_cmd()
-core.c:mmc_start_request()
Quoted 5 lines
I am a bit torn about these two. Even though we don't cater to out-of-tree stuff, having these as exported symbols shows that they are part of the API. Removing them might risk people going about doing something silly because they don't know the functionality exists, and we might not spot it at patch review time.
If mmc_start_request() is considered part of an API people should use, why isn't there a prototype in a header file?
Quoted 1 line
Rgds
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 4 lines · On Mon, 16 Jul 2007 04:33:46 +0200 Adrian Bunk <[email protected]> wrote:
If
mmc_start_request()is considered part of an API people should use, why isn't there a prototype in a header file?
Just goes to show how much I know. ;)
So I guess we can privatize that one. But I'd still like to keep mmc_wait_for_app_cmd().
Rgds
Signature · 5 lines
-- Pierre Ossman Linux kernel, MMC maintainer http://www.kernel.org PulseAudio, core developer http://pulseaudio.org rdesktop, core developer http://www.rdesktop.org