PageRenderTime 15ms CodeModel.GetById 11ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/drivers/mmc/core/bus.h

https://bitbucket.org/wisechild/galaxy-nexus
C++ Header | 31 lines | 16 code | 5 blank | 10 comment | 0 complexity | 5696e17644b0357c58762f7464305112 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.0, AGPL-1.0
 1/*
 2 *  linux/drivers/mmc/core/bus.h
 3 *
 4 *  Copyright (C) 2003 Russell King, All Rights Reserved.
 5 *  Copyright 2007 Pierre Ossman
 6 *
 7 * This program is free software; you can redistribute it and/or modify
 8 * it under the terms of the GNU General Public License version 2 as
 9 * published by the Free Software Foundation.
10 */
11#ifndef _MMC_CORE_BUS_H
12#define _MMC_CORE_BUS_H
13
14#define MMC_DEV_ATTR(name, fmt, args...)					\
15static ssize_t mmc_##name##_show (struct device *dev, struct device_attribute *attr, char *buf)	\
16{										\
17	struct mmc_card *card = mmc_dev_to_card(dev);				\
18	return sprintf(buf, fmt, args);						\
19}										\
20static DEVICE_ATTR(name, S_IRUGO, mmc_##name##_show, NULL)
21
22struct mmc_card *mmc_alloc_card(struct mmc_host *host,
23	struct device_type *type);
24int mmc_add_card(struct mmc_card *card);
25void mmc_remove_card(struct mmc_card *card);
26
27int mmc_register_bus(void);
28void mmc_unregister_bus(void);
29
30#endif
31