Re: kdbus: add driver skeleton, ioctl entry points and utility functions

2014-10-30 Thread Thomas Gleixner
On Fri, 31 Oct 2014, Jiri Kosina wrote: > On Fri, 31 Oct 2014, Thomas Gleixner wrote: > > > +static long kdbus_handle_ioctl(struct file *file, unsigned int cmd, > > > +unsigned long arg) > > > +{ > > > + struct kdbus_handle *handle = file->private_data; > > > + void __user *

Re: kdbus: add driver skeleton, ioctl entry points and utility functions

2014-10-30 Thread Jiri Kosina
On Fri, 31 Oct 2014, Thomas Gleixner wrote: > > +static long kdbus_handle_ioctl(struct file *file, unsigned int cmd, > > + unsigned long arg) > > +{ > > + struct kdbus_handle *handle = file->private_data; > > + void __user *argp = (void __user *)arg; > > + enum kdbus

Re: kdbus: add driver skeleton, ioctl entry points and utility functions

2014-10-30 Thread Thomas Gleixner
On Wed, 29 Oct 2014, Greg Kroah-Hartman wrote: > +/* kdbus major */ > +static unsigned int kdbus_major; > + > +/* map of minors to objects */ > +static DEFINE_IDR(kdbus_minor_idr); > + > +/* kdbus minor lock */ > +static DEFINE_SPINLOCK(kdbus_minor_lock); > + > +int kdbus_minor_init(void) > +{ > +

Re: kdbus: add driver skeleton, ioctl entry points and utility functions

2014-10-29 Thread Eric W. Biederman
Greg Kroah-Hartman writes: > From: Daniel Mack > > Add the basic driver structure. > > handle.c is the main ioctl command dispatcher that calls into other parts > of the driver. > > main.c contains the code that creates the initial domain at startup, and > util.c has utility functions such as it