aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/misc/tifm_core.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c
index 1e591989835d..70220beb3e04 100644
--- a/drivers/misc/tifm_core.c
+++ b/drivers/misc/tifm_core.c
@@ -142,14 +142,27 @@ static int tifm_device_resume(struct device *dev)
142 142
143#endif /* CONFIG_PM */ 143#endif /* CONFIG_PM */
144 144
145static ssize_t type_show(struct device *dev, struct device_attribute *attr,
146 char *buf)
147{
148 struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev);
149 return sprintf(buf, "%x", sock->type);
150}
151
152static struct device_attribute tifm_dev_attrs[] = {
153 __ATTR(type, S_IRUGO, type_show, NULL),
154 __ATTR_NULL
155};
156
145static struct bus_type tifm_bus_type = { 157static struct bus_type tifm_bus_type = {
146 .name = "tifm", 158 .name = "tifm",
147 .match = tifm_bus_match, 159 .dev_attrs = tifm_dev_attrs,
148 .uevent = tifm_uevent, 160 .match = tifm_bus_match,
149 .probe = tifm_device_probe, 161 .uevent = tifm_uevent,
150 .remove = tifm_device_remove, 162 .probe = tifm_device_probe,
151 .suspend = tifm_device_suspend, 163 .remove = tifm_device_remove,
152 .resume = tifm_device_resume 164 .suspend = tifm_device_suspend,
165 .resume = tifm_device_resume
153}; 166};
154 167
155static void tifm_free(struct class_device *cdev) 168static void tifm_free(struct class_device *cdev)