Thread (19 messages) 19 messages, 3 authors, 2015-08-17

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

From: Mark Brown <broonie@kernel.org>
Date: 2015-08-15 02:12:07
Also in: linux-arm-msm, lkml

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?

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help