Skip to content

Commit

Permalink
mmc: core: change quirks.c to be a header file
Browse files Browse the repository at this point in the history
Rename quirks.c to quirks.h, and include it for
individual C files which need it.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
Shawn Lin authored and Ulf Hansson committed Feb 15, 2017
1 parent 4e03f62 commit 28fc64a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion drivers/mmc/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mmc_core-y := core.o bus.o host.o \
mmc.o mmc_ops.o sd.o sd_ops.o \
sdio.o sdio_ops.o sdio_bus.o \
sdio_cis.o sdio_io.o sdio_irq.o \
quirks.o slot-gpio.o
slot-gpio.o
mmc_core-$(CONFIG_OF) += pwrseq.o
obj-$(CONFIG_PWRSEQ_SIMPLE) += pwrseq_simple.o
obj-$(CONFIG_PWRSEQ_SD8787) += pwrseq_sd8787.o
Expand Down
1 change: 1 addition & 0 deletions drivers/mmc/core/block.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include "host.h"
#include "bus.h"
#include "mmc_ops.h"
#include "quirks.h"
#include "sd_ops.h"

MODULE_ALIAS("mmc:block");
Expand Down
2 changes: 0 additions & 2 deletions drivers/mmc/core/card.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,4 @@ static inline int mmc_card_broken_hpi(const struct mmc_card *c)
return c->quirks & MMC_QUIRK_BROKEN_HPI;
}

void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table);

#endif
1 change: 1 addition & 0 deletions drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "host.h"
#include "bus.h"
#include "mmc_ops.h"
#include "quirks.h"
#include "sd_ops.h"

#define DEFAULT_CMD6_TIMEOUT_MS 500
Expand Down
8 changes: 2 additions & 6 deletions drivers/mmc/core/quirks.c → drivers/mmc/core/quirks.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
*
*/

#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/export.h>
#include <linux/mmc/card.h>
#include <linux/mmc/sdio_ids.h>

#include "card.h"
Expand Down Expand Up @@ -53,7 +49,8 @@ static const struct mmc_fixup mmc_fixup_methods[] = {
END_FIXUP
};

void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table)
static inline void mmc_fixup_device(struct mmc_card *card,
const struct mmc_fixup *table)
{
const struct mmc_fixup *f;
u64 rev = cid_rev_card(card);
Expand Down Expand Up @@ -82,4 +79,3 @@ void mmc_fixup_device(struct mmc_card *card, const struct mmc_fixup *table)
}
}
}
EXPORT_SYMBOL(mmc_fixup_device);
1 change: 1 addition & 0 deletions drivers/mmc/core/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "card.h"
#include "host.h"
#include "bus.h"
#include "quirks.h"
#include "sd.h"
#include "sdio_bus.h"
#include "mmc_ops.h"
Expand Down

0 comments on commit 28fc64a

Please sign in to comment.