linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yicong Yang <yangyicong@hisilicon.com>
To: <wsa@kernel.org>, <linux-i2c@vger.kernel.org>
Cc: <linuxarm@openeuler.org>, <prime.zeng@huawei.com>,
	John Garry <john.garry@huawei.com>
Subject: Re: [PATCH v2 2/3] i2c: add support for HiSilicon I2C controller
Date: Thu, 18 Mar 2021 18:37:03 +0800	[thread overview]
Message-ID: <3a5ee50e-a876-178c-b6c6-87c125030d83@hisilicon.com> (raw)
In-Reply-To: <1615296137-14558-3-git-send-email-yangyicong@hisilicon.com>

Hi,

On 2021/3/9 21:22, Yicong Yang wrote:
> +static int hisi_i2c_probe(struct platform_device *pdev)
> +{
> +	struct hisi_i2c_controller *ctlr;
> +	struct device *dev = &pdev->dev;
> +	struct i2c_adapter *adapter;
> +	u32 hw_version;
> +	int ret;
> +
> +	ctlr = devm_kzalloc(dev, sizeof(*ctlr), GFP_KERNEL);
> +	if (!ctlr)
> +		return -ENOMEM;
> +
> +	ctlr->dev = dev;
> +	ctlr->iobase = devm_platform_ioremap_resource(pdev, 0);
> +	if (IS_ERR(ctlr->iobase))
> +		return PTR_ERR(ctlr->iobase);
> +
> +	ctlr->irq = platform_get_irq(pdev, 0);
> +	if (ctlr->irq <= 0)
> +		return -ENOENT;
> +

here doesn't handle the -EPROBE_DEFER case, thanks john for noticing this.

Any other comments for this driver? or i'll send a v2 one with this fixed.

Thanks,
Yicong



  reply	other threads:[~2021-03-18 10:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 13:22 [PATCH v2 0/3] Add support for HiSilicon I2C controller Yicong Yang
2021-03-09 13:22 ` [PATCH v2 1/3] i2c: core: add managed function for adding i2c adapters Yicong Yang
2021-03-16  8:56   ` [Linuxarm] " Song Bao Hua (Barry Song)
2021-03-16 13:14     ` Yicong Yang
2021-03-09 13:22 ` [PATCH v2 2/3] i2c: add support for HiSilicon I2C controller Yicong Yang
2021-03-18 10:37   ` Yicong Yang [this message]
2021-03-09 13:22 ` [PATCH v2 3/3] MAINTAINERS: Add maintainer for HiSilicon I2C driver Yicong Yang

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=3a5ee50e-a876-178c-b6c6-87c125030d83@hisilicon.com \
    --to=yangyicong@hisilicon.com \
    --cc=john.garry@huawei.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=prime.zeng@huawei.com \
    --cc=wsa@kernel.org \
    /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).