[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b6fcc0a0701240550t3156782eub36b41a0d6ffe75c@mail.gmail.com>
Date: Wed, 24 Jan 2007 16:50:34 +0300
From: "Alexey Dobriyan" <adobriyan@...il.com>
To: "Pavel Machek" <pavel@....cz>
Cc: akpm@...l.org, linux-kernel@...r.kernel.org,
linux-mips@...ux-mips.org
Subject: Re: [PATCH] seq_file conversion: APM on mips
On 1/23/07, Pavel Machek <pavel@....cz> wrote:
> Hi!
>
> > @@ -456,14 +456,26 @@ static int apm_get_info(char *buf, char
> > case 1: units = "sec"; break;
> > }
> >
> > - ret = sprintf(buf, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n",
> > + seq_printf(m, "%s 1.2 0x%02x 0x%02x 0x%02x 0x%02x %d%% %d %s\n",
> > driver_version, APM_32_BIT_SUPPORT,
> > info.ac_line_status, info.battery_status,
> > info.battery_flag, info.battery_life,
> > info.time, units);
> > + return 0;
> > +}
> >
> > - return ret;
> > +static int proc_apm_open(struct inode *inode, struct file *file)
> > +{
> > + return single_open(file, proc_apm_show, NULL);
> > }
> > +
> > +static const struct file_operations proc_apm_fops = {
> > + .owner = THIS_MODULE,
> > + .open = proc_apm_open,
> > + .read = seq_read,
> > + .llseek = seq_lseek,
> > + .release = single_release,
> > +};
> > #endif
> >
> > static int kapmd(void *arg)
>
> Perhaps now is good time to make the code shared?
Well, my intention was to remove last ->get_info users and
remove struct proc_dir_entry::get_info altogether.
I didn't know about APM merging efforts.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists