On 1/23/07, Pavel Machek <[email protected]> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]