Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213461
b: refs/heads/master
c: 70a9156
h: refs/heads/master
i:
  213459: 89d7c1c
v: v3
  • Loading branch information
Eric W. Biederman authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 0b5c327 commit 3ee2c71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 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: 3d4f9d76b0641b7984f95982e390927fc5998ad6
refs/heads/master: 70a9156bad9d9d1476df35dde582b9f411bf5914
17 changes: 3 additions & 14 deletions trunk/drivers/uio/uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,33 +229,23 @@ static ssize_t show_name(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct uio_device *idev = dev_get_drvdata(dev);
if (idev)
return sprintf(buf, "%s\n", idev->info->name);
else
return -ENODEV;
return sprintf(buf, "%s\n", idev->info->name);
}
static DEVICE_ATTR(name, S_IRUGO, show_name, NULL);

static ssize_t show_version(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct uio_device *idev = dev_get_drvdata(dev);
if (idev)
return sprintf(buf, "%s\n", idev->info->version);
else
return -ENODEV;
return sprintf(buf, "%s\n", idev->info->version);
}
static DEVICE_ATTR(version, S_IRUGO, show_version, NULL);

static ssize_t show_event(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct uio_device *idev = dev_get_drvdata(dev);
if (idev)
return sprintf(buf, "%u\n",
(unsigned int)atomic_read(&idev->event));
else
return -ENODEV;
return sprintf(buf, "%u\n", (unsigned int)atomic_read(&idev->event));
}
static DEVICE_ATTR(event, S_IRUGO, show_event, NULL);

Expand Down Expand Up @@ -878,7 +868,6 @@ void uio_unregister_device(struct uio_info *info)

uio_dev_del_attributes(idev);

dev_set_drvdata(idev->dev, NULL);
device_destroy(uio_class, MKDEV(uio_major, idev->minor));
kfree(idev);

Expand Down

0 comments on commit 3ee2c71

Please sign in to comment.