From 51ec92e295d563dd5712d198a7e46c2ae5ccccb2 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 21 Mar 2008 23:54:50 +0100 Subject: mmc: use sysfs groups to handle conditional attributes Suppressing uevents turned out to be a bad idea as it screws up the order of events, making user space very confused. Change the system to use sysfs groups instead. This is a regression that, for some odd reason, has gone unnoticed for some time. It confuses hal so that the block devices (which have the mmc device as a parent) are not registered. End result being that desktop magic when cards are inserted won't work. Signed-off-by: Pierre Ossman Signed-off-by: Linus Torvalds --- drivers/mmc/core/sysfs.h | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 drivers/mmc/core/sysfs.h (limited to 'drivers/mmc/core/sysfs.h') diff --git a/drivers/mmc/core/sysfs.h b/drivers/mmc/core/sysfs.h deleted file mode 100644 index 4b8f670bd10..00000000000 --- a/drivers/mmc/core/sysfs.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * linux/drivers/mmc/core/sysfs.h - * - * Copyright (C) 2003 Russell King, All Rights Reserved. - * Copyright 2007 Pierre Ossman - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ -#ifndef _MMC_CORE_SYSFS_H -#define _MMC_CORE_SYSFS_H - -#define MMC_ATTR_FN(name, fmt, args...) \ -static ssize_t mmc_##name##_show (struct device *dev, struct device_attribute *attr, char *buf) \ -{ \ - struct mmc_card *card = container_of(dev, struct mmc_card, dev);\ - return sprintf(buf, fmt, args); \ -} - -#define MMC_ATTR_RO(name) __ATTR(name, S_IRUGO, mmc_##name##_show, NULL) - -int mmc_add_attrs(struct mmc_card *card, struct device_attribute *attrs); -void mmc_remove_attrs(struct mmc_card *card, struct device_attribute *attrs); - -#endif -- cgit v1.2.3