This patch adds an mmap method and some more error checking to struct bin_attribute--good for things like exporting PCI resources directly. I wasn't sure about the return values for the case where an attribute is missing a given method, and it looks like mm.h can't be included in sysfs.h, so I had to forward declare struct vm_area_struct. Other than that, it works fine for my test cases. fs/sysfs/bin.c | 27 +++++++++++++++++++++++++-- include/linux/sysfs.h | 6 ++++++ 2 files changed, 31 insertions(+), 2 deletions(-) Signed-off-by: Jesse Barnes Thanks, Jesse