[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150814181754.GC10748@sirena.org.uk>
Date: Fri, 14 Aug 2015 19:17:54 +0100
From: Mark Brown <broonie@...nel.org>
To: Sagar Dharia <sdharia@...eaurora.org>
Cc: gregkh@...uxfoundation.org, bp@...e.de, poeschel@...onage.de,
treding@...dia.com, gong.chen@...ux.intel.com,
andreas.noever@...il.com, alan@...ux.intel.com,
mathieu.poirier@...aro.org, daniel@...ll.ch, oded.gabbay@....com,
jkosina@...e.cz, sharon.dvir1@...l.huji.ac.il, joe@...ches.com,
davem@...emloft.net, james.hogan@...tec.com,
michael.opdenacker@...e-electrons.com, daniel.thompson@...aro.org,
robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
kheitke@...ience.com, mlocke@...eaurora.org, agross@...eaurora.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH V3 1/6] SLIMbus: Device management on SLIMbus
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?
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists