Re: [PATCH] staging: unisys: handle major number properly

2015-03-24 Thread Dan Carpenter
On Tue, Mar 24, 2015 at 02:13:16PM +0530, Sudip Mukherjee wrote: > On Tue, Mar 24, 2015 at 11:32:47AM +0300, Dan Carpenter wrote: > > > > } > > > - rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1); > > > + rc = cdev_add(&file_cdev, MKDEV(major, 0), 1); > > > > This should just be: > > >

Re: [PATCH] staging: unisys: handle major number properly

2015-03-24 Thread Sudip Mukherjee
On Tue, Mar 24, 2015 at 11:32:47AM +0300, Dan Carpenter wrote: > > } > > - rc = cdev_add(&file_cdev, MKDEV(MAJOR(majordev), 0), 1); > > + rc = cdev_add(&file_cdev, MKDEV(major, 0), 1); > > This should just be: > > rc = cdev_add(&file_cdev, majordev, 1); > > So here is my suggestio

Re: [PATCH] staging: unisys: handle major number properly

2015-03-24 Thread Dan Carpenter
This patch also doesn't introduce bugs but it's sort of whacky and hard to understand. Also the subject and description imply or say "fix" but it's just a cleanup. The original code was also proper but just messy. On Tue, Mar 17, 2015 at 08:31:24PM +0530, Sudip Mukherjee wrote: > fixed the handl

Re: [PATCH] staging: unisys: handle major number properly

2015-03-23 Thread Sudip Mukherjee
On Mon, Mar 23, 2015 at 10:04:40PM +0100, Greg Kroah-Hartman wrote: > On Tue, Mar 17, 2015 at 08:31:24PM +0530, Sudip Mukherjee wrote: > > This doesn't apply anymore, due to other changes recently to this > driver. > > But even if it did, I don't think it is correct. I really don't > understand w

Re: [PATCH] staging: unisys: handle major number properly

2015-03-23 Thread Greg Kroah-Hartman
On Tue, Mar 17, 2015 at 08:31:24PM +0530, Sudip Mukherjee wrote: > fixed the handling of dev_t and the major number. > now the major and minor number is passed to the init function. > similarly in the cleanup function dev_t is passed to unregister it. > > Signed-off-by: Sudip Mukherjee > --- > d

[PATCH] staging: unisys: handle major number properly

2015-03-17 Thread Sudip Mukherjee
fixed the handling of dev_t and the major number. now the major and minor number is passed to the init function. similarly in the cleanup function dev_t is passed to unregister it. Signed-off-by: Sudip Mukherjee --- drivers/staging/unisys/visorchipset/file.c | 18 --