Re: [PATCH v2 3/4] libfcoe: Add fcoe_sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 17, 2012 at 01:12:10AM +0000, Love, Robert W wrote:
> >> +	ctlr->f = f;
> >> +	INIT_LIST_HEAD(&ctlr->fcfs);
> >> +	mutex_init(&ctlr->lock);
> >> +	device_initialize(&ctlr->dev);
> >> +	ctlr->dev.parent = get_device(parent);
> > I thought you dropped these get_device() calls on the parent?  The
> > driver core handles this for you, please don't do it here, it's not
> > needed.
> 
> How would the driver core know what this device's parent is? This is the 
> only place I do that assignment.

I'm not saying that assigning the parent is wrong, I'm saying you don't
need to grab the reference to the parent here.

The code should just be:
	ctrl->dev.parent = parent;

When you register the device, the parent will be properly reference
counted.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux