From: Bing Bu Cao <bingbu.cao@linux.intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>, bingbu.cao@intel.com
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
tfiga@google.com, jacopo@jmondi.org, rajmohan.mani@intel.com,
tian.shu.qiu@intel.com, jian.xu.zheng@intel.com
Subject: Re: [PATCH v5 2/2] media: ak7375: Add ak7375 lens voice coil driver
Date: Fri, 22 Jun 2018 11:11:54 +0800 [thread overview]
Message-ID: <6e2fa794-b711-eb55-a72f-02e310ac5e96@linux.intel.com> (raw)
In-Reply-To: <20180621112516.mwlph7u6et65gbh6@paasikivi.fi.intel.com>
On 2018年06月21日 19:25, Sakari Ailus wrote:
> On Tue, Jun 19, 2018 at 02:01:47PM +0800, bingbu.cao@intel.com wrote:
>> +static int ak7375_probe(struct i2c_client *client)
>> +{
>> + struct ak7375_device *ak7375_dev;
>> + int val;
>> +
>> + ak7375_dev = devm_kzalloc(&client->dev, sizeof(*ak7375_dev),
>> + GFP_KERNEL);
>> + if (!ak7375_dev)
>> + return -ENOMEM;
>> +
>> + v4l2_i2c_subdev_init(&ak7375_dev->sd, client, &ak7375_ops);
>> + ak7375_dev->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
>> + ak7375_dev->sd.internal_ops = &ak7375_int_ops;
>> + ak7375_dev->sd.entity.function = MEDIA_ENT_F_LENS;
>> +
>> + val = ak7375_init_controls(ak7375_dev);
>> + if (val)
>> + goto err_cleanup;
>> +
>> + val = media_entity_pads_init(&ak7375_dev->sd.entity, 0, NULL);
>> + if (val < 0)
>> + goto err_cleanup;
>> +
>> + val = v4l2_async_register_subdev(&ak7375_dev->sd);
>> + if (val < 0)
>> + goto err_cleanup;
>> +
>> + pm_runtime_set_active(&client->dev);
>> + pm_runtime_enable(&client->dev);
>> + pm_runtime_idle(&client->dev);
>> +
>> + return 0;
>> +
>> +err_cleanup:
>> + v4l2_ctrl_handler_free(&ak7375_dev->ctrls_vcm);
>> + media_entity_cleanup(&ak7375_dev->sd.entity);
>> + dev_err(&client->dev, "Probe failed: %d\n", val);
> This line is redundant, too: the kernel already prints the error value.
Ack.
Sakari, please help apply patch with this change, thanks!
>> +
>> + return val;
>> +}
prev parent reply other threads:[~2018-06-22 3:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 6:01 [PATCH v5 1/2] dt-bindings: Add bindings for AKM ak7375 voice coil lens bingbu.cao
2018-06-19 6:01 ` [PATCH v5 2/2] media: ak7375: Add ak7375 lens voice coil driver bingbu.cao
2018-06-21 11:23 ` Sakari Ailus
2018-06-22 3:08 ` Bing Bu Cao
2018-06-21 11:25 ` Sakari Ailus
2018-06-22 3:11 ` Bing Bu Cao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6e2fa794-b711-eb55-a72f-02e310ac5e96@linux.intel.com \
--to=bingbu.cao@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=jacopo@jmondi.org \
--cc=jian.xu.zheng@intel.com \
--cc=linux-media@vger.kernel.org \
--cc=rajmohan.mani@intel.com \
--cc=sakari.ailus@linux.intel.com \
--cc=tfiga@google.com \
--cc=tian.shu.qiu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).