* + ipw2x00-convert-to-seq_file.patch added to -mm tree
@ 2009-11-25 21:11 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2009-11-25 21:11 UTC (permalink / raw)
To: mm-commits; +Cc: adobriyan, linville
The patch titled
ipw2x00: convert to seq_file
has been added to the -mm tree. Its filename is
ipw2x00-convert-to-seq_file.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: ipw2x00: convert to seq_file
From: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/net/wireless/ipw2x00/libipw_module.c | 33 +++++++++++------
1 file changed, 22 insertions(+), 11 deletions(-)
diff -puN drivers/net/wireless/ipw2x00/libipw_module.c~ipw2x00-convert-to-seq_file drivers/net/wireless/ipw2x00/libipw_module.c
--- a/drivers/net/wireless/ipw2x00/libipw_module.c~ipw2x00-convert-to-seq_file
+++ a/drivers/net/wireless/ipw2x00/libipw_module.c
@@ -248,17 +248,22 @@ u32 libipw_debug_level = 0;
EXPORT_SYMBOL_GPL(libipw_debug_level);
static struct proc_dir_entry *libipw_proc = NULL;
-static int show_debug_level(char *page, char **start, off_t offset,
- int count, int *eof, void *data)
+static int debug_level_proc_show(struct seq_file *m, void *v)
{
- return snprintf(page, count, "0x%08X\n", libipw_debug_level);
+ seq_printf(m, "0x%08X\n", libipw_debug_level);
+ return 0;
}
-static int store_debug_level(struct file *file, const char __user * buffer,
- unsigned long count, void *data)
+static int debug_level_proc_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, debug_level_proc_show, NULL);
+}
+
+static ssize_t debug_level_proc_write(struct file *file,
+ const char __user *buffer, size_t count, loff_t *pos)
{
char buf[] = "0x00000000\n";
- unsigned long len = min((unsigned long)sizeof(buf) - 1, count);
+ size_t len = min(sizeof(buf) - 1, count);
unsigned long val;
if (copy_from_user(buf, buffer, len))
@@ -272,6 +277,15 @@ static int store_debug_level(struct file
return strnlen(buf, len);
}
+
+static const struct file_operations debug_level_proc_fops = {
+ .owner = THIS_MODULE,
+ .open = debug_level_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+ .write = debug_level_proc_write,
+};
#endif /* CONFIG_LIBIPW_DEBUG */
static int __init libipw_init(void)
@@ -286,16 +300,13 @@ static int __init libipw_init(void)
" proc directory\n");
return -EIO;
}
- e = create_proc_entry("debug_level", S_IFREG | S_IRUGO | S_IWUSR,
- libipw_proc);
+ e = proc_create("debug_level", S_IRUGO | S_IWUSR, libipw_proc,
+ &debug_level_proc_fops);
if (!e) {
remove_proc_entry(DRV_NAME, init_net.proc_net);
libipw_proc = NULL;
return -EIO;
}
- e->read_proc = show_debug_level;
- e->write_proc = store_debug_level;
- e->data = NULL;
#endif /* CONFIG_LIBIPW_DEBUG */
printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n");
_
Patches currently in -mm which might be from adobriyan@gmail.com are
linux-next.patch
proc_fops-convert-av7110.patch
proc_fops-convert-cpia.patch
genirq-switch-proc-irq-spurious-to-seq_file.patch
proc_fops-convert-drivers-isdn-to-seq_file.patch
proc_fops-convert-drivers-isdn-to-seq_file-fix.patch
const-constify-remaining-dev_pm_ops.patch
uml-irq-register-race-condition.patch
make-debug_bugverbose-default-to-y.patch
proc-rename-de_get-to-pde_get-and-inline-it.patch
const-constify-remaining-pipe_buf_operations.patch
ufs-pass-qstr-instead-of-dentry-where-necessary-for-nfs.patch
ufs-nfs-support.patch
reiserfs-remove-proc-fs-reiserfs-version.patch
reiserfs-dont-compile-procfso-at-all-if-no-support.patch
mpt-fusion-convert-to-seq_file.patch
ray_cs-convert-to-proc_fops.patch
ipw2x00-convert-to-seq_file.patch
thinkpad_acpi-convert-to-seq_file.patch
asus_acpi-convert-to-seq_file.patch
toshiba_acpi-convert-to-seq_file.patch
pnpbios-convert-to-seq_file.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-11-25 21:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25 21:11 + ipw2x00-convert-to-seq_file.patch added to -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox