Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320723
b: refs/heads/master
c: 27130f0
h: refs/heads/master
i:
  320721: 04e8f52
  320719: ef2a993
v: v3
  • Loading branch information
Mark Brown authored and Theodore Ts'o committed Jul 19, 2012
1 parent 13ca131 commit 3696a57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9dccf55f4cb011a7552a8a2749a580662f5ed8ed
refs/heads/master: 27130f0cc3ab97560384da437e4621fc4e94f21c
8 changes: 8 additions & 0 deletions trunk/drivers/mfd/wm831x-otp.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/bcd.h>
#include <linux/delay.h>
#include <linux/mfd/core.h>
#include <linux/random.h>

#include <linux/mfd/wm831x/core.h>
#include <linux/mfd/wm831x/otp.h>
Expand Down Expand Up @@ -66,13 +67,20 @@ static DEVICE_ATTR(unique_id, 0444, wm831x_unique_id_show, NULL);

int wm831x_otp_init(struct wm831x *wm831x)
{
char uuid[WM831X_UNIQUE_ID_LEN];
int ret;

ret = device_create_file(wm831x->dev, &dev_attr_unique_id);
if (ret != 0)
dev_err(wm831x->dev, "Unique ID attribute not created: %d\n",
ret);

ret = wm831x_unique_id_read(wm831x, uuid);
if (ret == 0)
add_device_randomness(uuid, sizeof(uuid));
else
dev_err(wm831x->dev, "Failed to read UUID: %d\n", ret);

return ret;
}

Expand Down

0 comments on commit 3696a57

Please sign in to comment.