mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
UIO: fix kobject usage
The uio kobject code is "wierd". This patch should hopefully fix it up to be sane and not leak memory anymore. Cc: Kay Sievers <kay.sievers@vrfy.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Benedikt Spranger <b.spranger@linutronix.de> Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
9f66fa2a46
commit
81e7c6a636
2 changed files with 52 additions and 45 deletions
|
@ -18,20 +18,22 @@
|
|||
#include <linux/fs.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
struct uio_map;
|
||||
|
||||
/**
|
||||
* struct uio_mem - description of a UIO memory region
|
||||
* @kobj: kobject for this mapping
|
||||
* @addr: address of the device's memory
|
||||
* @size: size of IO
|
||||
* @memtype: type of memory addr points to
|
||||
* @internal_addr: ioremap-ped version of addr, for driver internal use
|
||||
* @map: for use by the UIO core only.
|
||||
*/
|
||||
struct uio_mem {
|
||||
struct kobject kobj;
|
||||
unsigned long addr;
|
||||
unsigned long size;
|
||||
int memtype;
|
||||
void __iomem *internal_addr;
|
||||
struct uio_map *map;
|
||||
};
|
||||
|
||||
#define MAX_UIO_MAPS 5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue