lkml.org 
[lkml]   [2004]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] add PCI API to sysfs
Date
On Monday, December 20, 2004 2:58 pm, Greg KH wrote:
> On Mon, Dec 20, 2004 at 02:50:46PM -0800, Jesse Barnes wrote:
> > Ok, how does this one look? It needs some obvious work, but is the
> > approach of adding functionality to sysfs instead of /proc the right way
> > to go? What I've done:
> >
> > o add mmap support to bin files in sysfs
> > o make PCI resources available via mmap
> > o make legacy I/O and memory space available in sysfs
>
> How about splitting this up into the different patches that each do one
> thing?

Sure, I forgot the diffstat too (doh!).

> > +static int mmap(struct file *file, struct vm_area_struct *vma)
> > +{
> > + struct dentry *dentry = file->f_dentry;
> > + struct bin_attribute *attr = to_bin_attr(dentry);
> > + struct kobject *kobj = to_kobj(dentry->d_parent);
> > +
> > + return attr->mmap(kobj, attr, vma);
> > +}
> > +
>
> What happens if mmap is not set? oops...

Yeah, I mentioned that in "things to do" at the bottom, but I'm really looking
for an "ack, this is a sane way to go" before I sink much more time into it.

Thanks,
Jesse
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:1.113 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site