Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186897
b: refs/heads/master
c: ca229f1
h: refs/heads/master
i:
  186895: e06c041
v: v3
  • Loading branch information
Linus Walleij authored and Samuel Ortiz committed Mar 7, 2010
1 parent 5f8c6ed commit d493f12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 2071db4848ea809887e97248dd3dec02a2e3dd6b
refs/heads/master: ca229f1b624a72a1c9eb1d94bbca7a0c094a1b8b
13 changes: 7 additions & 6 deletions trunk/drivers/mfd/ab3100-otp.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/platform_device.h>
#include <linux/mfd/ab3100.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>

/* The OTP registers */
#define AB3100_OTP0 0xb0
Expand Down Expand Up @@ -95,11 +96,10 @@ static int __init ab3100_otp_read(struct ab3100_otp *otp)
* This is a simple debugfs human-readable file that dumps out
* the contents of the OTP.
*/
#ifdef CONFIG_DEBUGFS
static int show_otp(struct seq_file *s, void *v)
#ifdef CONFIG_DEBUG_FS
static int ab3100_show_otp(struct seq_file *s, void *v)
{
struct ab3100_otp *otp = s->private;
int err;

seq_printf(s, "OTP is %s\n", otp->locked ? "LOCKED" : "UNLOCKED");
seq_printf(s, "OTP clock switch startup is %uHz\n", otp->freq);
Expand All @@ -113,7 +113,7 @@ static int show_otp(struct seq_file *s, void *v)

static int ab3100_otp_open(struct inode *inode, struct file *file)
{
return single_open(file, ab3100_otp_show, inode->i_private);
return single_open(file, ab3100_show_otp, inode->i_private);
}

static const struct file_operations ab3100_otp_operations = {
Expand All @@ -131,13 +131,14 @@ static int __init ab3100_otp_init_debugfs(struct device *dev,
&ab3100_otp_operations);
if (!otp->debugfs) {
dev_err(dev, "AB3100 debugfs OTP file registration failed!\n");
return err;
return -ENOENT;
}
return 0;
}

static void __exit ab3100_otp_exit_debugfs(struct ab3100_otp *otp)
{
debugfs_remove_file(otp->debugfs);
debugfs_remove(otp->debugfs);
}
#else
/* Compile this out if debugfs not selected */
Expand Down

0 comments on commit d493f12

Please sign in to comment.