Re: [PATCH V3 1/6] SLIMbus: Device management on SLIMbus

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

 




On Mon, Aug 03, 2015 at 12:59:45AM -0600, Sagar Dharia wrote:

> +	INIT_WORK(&sbw->wd, slim_report);
> +	sbw->sb = sb;
> +	sbw->report = report;
> +	if (!queue_work(ctrl->wq, &sbw->wd))
> +		kfree(sbw);

Should we not complain if we fail to schedule the work?

> +#define slim_device_attr_gr NULL
> +#define slim_device_uevent NULL
> +
> +static struct device_type slim_dev_type = {
> +	.groups		= slim_device_attr_gr,
> +	.uevent		= slim_device_uevent,

Why these NULL defines?  Just add the struct members as definitions are
added.

> +	dev_set_name(&sbdev->dev, "%s", sbdev->name);
> +	mutex_lock(&ctrl->m_ctrl);
> +	list_add_tail(&sbdev->dev_list, &ctrl->devs);
> +	mutex_unlock(&ctrl->m_ctrl);

Doesn't the driver model list of children of the controller give you
a list of devices connected to the controller?

> +	/* Can't register until after driver model init */
> +	if (WARN_ON(!slimbus_type.p)) {
> +		ret = -EAGAIN;
> +		goto out_list;
> +	}

Shouldn't the core code handle this for us?

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux