Thanks, that's a cleaner approach. Apologies for delayed reply as I'm in middle of a house move. I'll send an updated patch soon. Okash > On 2 Dec 2015, at 13:17, Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > Probably it's better to create a different struct: > > struct udata_s { > unsigned int size; > void __user *buf; > }; > > regards, > dan carpenter > > _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel