Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313858
b: refs/heads/master
c: 72f6e3a
h: refs/heads/master
v: v3
  • Loading branch information
Sebastian Ott authored and Martin Schwidefsky committed Jun 5, 2012
1 parent a9871fd commit 304f4b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76e0377b2450af577077c7e4e00ae6da738d1884
refs/heads/master: 72f6e3a8bc956fddf6e004ae9b804977d1458e77
25 changes: 13 additions & 12 deletions trunk/drivers/s390/char/vmlogrdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,19 @@ static ssize_t vmlogrdr_recording_status_show(struct device_driver *driver,
len = strlen(buf);
return len;
}


static DRIVER_ATTR(recording_status, 0444, vmlogrdr_recording_status_show,
NULL);
static struct attribute *vmlogrdr_drv_attrs[] = {
&driver_attr_recording_status.attr,
NULL,
};
static struct attribute_group vmlogrdr_drv_attr_group = {
.attrs = vmlogrdr_drv_attrs,
};
static const struct attribute_group *vmlogrdr_drv_attr_groups[] = {
&vmlogrdr_drv_attr_group,
NULL,
};

static struct attribute *vmlogrdr_attrs[] = {
&dev_attr_autopurge.attr,
Expand Down Expand Up @@ -704,9 +713,9 @@ static struct device_driver vmlogrdr_driver = {
.name = "vmlogrdr",
.bus = &iucv_bus,
.pm = &vmlogrdr_pm_ops,
.groups = vmlogrdr_drv_attr_groups,
};


static int vmlogrdr_register_driver(void)
{
int ret;
Expand All @@ -720,21 +729,14 @@ static int vmlogrdr_register_driver(void)
if (ret)
goto out_iucv;

ret = driver_create_file(&vmlogrdr_driver,
&driver_attr_recording_status);
if (ret)
goto out_driver;

vmlogrdr_class = class_create(THIS_MODULE, "vmlogrdr");
if (IS_ERR(vmlogrdr_class)) {
ret = PTR_ERR(vmlogrdr_class);
vmlogrdr_class = NULL;
goto out_attr;
goto out_driver;
}
return 0;

out_attr:
driver_remove_file(&vmlogrdr_driver, &driver_attr_recording_status);
out_driver:
driver_unregister(&vmlogrdr_driver);
out_iucv:
Expand All @@ -748,7 +750,6 @@ static void vmlogrdr_unregister_driver(void)
{
class_destroy(vmlogrdr_class);
vmlogrdr_class = NULL;
driver_remove_file(&vmlogrdr_driver, &driver_attr_recording_status);
driver_unregister(&vmlogrdr_driver);
iucv_unregister(&vmlogrdr_iucv_handler, 1);
}
Expand Down

0 comments on commit 304f4b2

Please sign in to comment.