From: "Alexey Dobriyan" <adobriyan@gmail.com>
To: "Pavel Machek" <pavel@ucw.cz>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org
Subject: Re: [PATCH] seq_file conversion: APM on mips
Date: Wed, 24 Jan 2007 16:50:34 +0300 [thread overview]
Message-ID: <b6fcc0a0701240550t3156782eub36b41a0d6ffe75c@mail.gmail.com> (raw)
In-Reply-To: <20070123143614.GA6596@ucw.cz>
On 1/23/07, Pavel Machek <pavel@ucw.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.
prev parent reply other threads:[~2007-01-24 13:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-15 21:14 Alexey Dobriyan
2007-01-23 14:36 ` Pavel Machek
2007-01-24 13:50 ` Alexey Dobriyan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6fcc0a0701240550t3156782eub36b41a0d6ffe75c@mail.gmail.com \
--to=adobriyan@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=pavel@ucw.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®