2 * linux/drivers/mmc/core/sysfs.c
4 * Copyright (C) 2003 Russell King, All Rights Reserved.
5 * Copyright 2007 Pierre Ossman
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.
11 * MMC sysfs/driver model support.
13 #include <linux/device.h>
15 #include <linux/mmc/card.h>
19 int mmc_add_attrs(struct mmc_card
*card
, struct device_attribute
*attrs
)
24 for (i
= 0; attr_name(attrs
[i
]); i
++) {
25 error
= device_create_file(&card
->dev
, &attrs
[i
]);
28 device_remove_file(&card
->dev
, &attrs
[i
]);
36 void mmc_remove_attrs(struct mmc_card
*card
, struct device_attribute
*attrs
)
40 for (i
= 0; attr_name(attrs
[i
]); i
++)
41 device_remove_file(&card
->dev
, &attrs
[i
]);