aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm/solos-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atm/solos-pci.c')
-rw-r--r--drivers/atm/solos-pci.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/drivers/atm/solos-pci.c b/drivers/atm/solos-pci.c
index d9262a428dd6..b0c4676296ba 100644
--- a/drivers/atm/solos-pci.c
+++ b/drivers/atm/solos-pci.c
@@ -371,8 +371,28 @@ static ssize_t console_store(struct device *dev, struct device_attribute *attr,
371} 371}
372 372
373static DEVICE_ATTR(console, 0644, console_show, console_store); 373static DEVICE_ATTR(console, 0644, console_show, console_store);
374static DEVICE_ATTR(OperationalMode, 0444, solos_param_show, NULL); 374
375static DEVICE_ATTR(AutoStart, 0644, solos_param_show, solos_param_store); 375
376#define SOLOS_ATTR_RO(x) static DEVICE_ATTR(x, 0444, solos_param_show, NULL);
377#define SOLOS_ATTR_RW(x) static DEVICE_ATTR(x, 0644, solos_param_show, solos_param_store);
378
379#include "solos-attrlist.c"
380
381#undef SOLOS_ATTR_RO
382#undef SOLOS_ATTR_RW
383
384#define SOLOS_ATTR_RO(x) &dev_attr_##x.attr,
385#define SOLOS_ATTR_RW(x) &dev_attr_##x.attr,
386
387static struct attribute *solos_attrs[] = {
388#include "solos-attrlist.c"
389 NULL
390};
391
392static struct attribute_group solos_attr_group = {
393 .attrs = solos_attrs,
394 .name = "parameters",
395};
376 396
377static int flash_upgrade(struct solos_card *card, int chip) 397static int flash_upgrade(struct solos_card *card, int chip)
378{ 398{
@@ -987,10 +1007,8 @@ static int atm_init(struct solos_card *card)
987 } 1007 }
988 if (device_create_file(&card->atmdev[i]->class_dev, &dev_attr_console)) 1008 if (device_create_file(&card->atmdev[i]->class_dev, &dev_attr_console))
989 dev_err(&card->dev->dev, "Could not register console for ATM device %d\n", i); 1009 dev_err(&card->dev->dev, "Could not register console for ATM device %d\n", i);
990 if (device_create_file(&card->atmdev[i]->class_dev, &dev_attr_OperationalMode)) 1010 if (sysfs_create_group(&card->atmdev[i]->class_dev.kobj, &solos_attr_group))
991 dev_err(&card->dev->dev, "Could not register opmode attr for ATM device %d\n", i); 1011 dev_err(&card->dev->dev, "Could not register parameter group for ATM device %d\n", i);
992 if (device_create_file(&card->atmdev[i]->class_dev, &dev_attr_AutoStart))
993 dev_err(&card->dev->dev, "Could not register autostart attr for ATM device %d\n", i);
994 1012
995 dev_info(&card->dev->dev, "Registered ATM device %d\n", card->atmdev[i]->number); 1013 dev_info(&card->dev->dev, "Registered ATM device %d\n", card->atmdev[i]->number);
996 1014