spi: sprd: adi: Remove redundant address bits setting
[linux/fpc-iii.git] / drivers / mmc / core / bus.h
blob8105852c4b62f5a3aae101e7b0d55a4cbf08f019
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * linux/drivers/mmc/core/bus.h
5 * Copyright (C) 2003 Russell King, All Rights Reserved.
6 * Copyright 2007 Pierre Ossman
7 */
8 #ifndef _MMC_CORE_BUS_H
9 #define _MMC_CORE_BUS_H
11 #include <linux/device.h>
13 struct mmc_host;
14 struct mmc_card;
16 #define MMC_DEV_ATTR(name, fmt, args...) \
17 static ssize_t mmc_##name##_show (struct device *dev, struct device_attribute *attr, char *buf) \
18 { \
19 struct mmc_card *card = mmc_dev_to_card(dev); \
20 return sprintf(buf, fmt, args); \
21 } \
22 static DEVICE_ATTR(name, S_IRUGO, mmc_##name##_show, NULL)
24 struct mmc_card *mmc_alloc_card(struct mmc_host *host,
25 struct device_type *type);
26 int mmc_add_card(struct mmc_card *card);
27 void mmc_remove_card(struct mmc_card *card);
29 int mmc_register_bus(void);
30 void mmc_unregister_bus(void);
32 struct mmc_driver {
33 struct device_driver drv;
34 int (*probe)(struct mmc_card *card);
35 void (*remove)(struct mmc_card *card);
36 void (*shutdown)(struct mmc_card *card);
39 int mmc_register_driver(struct mmc_driver *drv);
40 void mmc_unregister_driver(struct mmc_driver *drv);
42 #endif