From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH 1/3] i2c: tegra: Support DVC controller in device tree
Date: Sun, 18 Dec 2011 16:42:08 +0100 [thread overview]
Message-ID: <20111218154208.GA5600@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <1324186101-23695-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 562 bytes --]
* Stephen Warren wrote:
[...]
> @@ -636,7 +649,18 @@ static int tegra_i2c_probe(struct platform_device *pdev)
> i2c_dev->bus_clk_rate = be32_to_cpup(prop);
> }
>
> - if (pdev->id == 3)
> +#if defined(CONFIG_OF)
> + if (pdev->dev.of_node) {
> + const struct of_device_id *match;
> +
> + match = of_match_device(tegra_i2c_of_match, &pdev->dev);
> + if (!match)
> + return -EINVAL;
> +
> + i2c_dev->is_dvc = match->data;
> + }
> +#endif
> + else if (pdev->id == 3)
Shouldn't the "else" move into the CONFIG_OF branch?
Thierry
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-12-18 15:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-18 5:28 [PATCH 1/3] i2c: tegra: Support DVC controller in device tree Stephen Warren
[not found] ` <1324186101-23695-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-18 5:28 ` [PATCH 2/3] arm/dt: tegra: Use new compatible value for DVC I2C controller Stephen Warren
2011-12-18 5:28 ` [PATCH 3/3] arm/dt: Add ADT7461 to Seaboard Stephen Warren
2011-12-18 5:41 ` [PATCH 1/3] i2c: tegra: Support DVC controller in device tree Olof Johansson
2011-12-18 15:42 ` Thierry Reding [this message]
[not found] ` <20111218154208.GA5600-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2011-12-18 15:46 ` Thierry Reding
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=20111218154208.GA5600@avionic-0098.mockup.avionic-design.de \
--to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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).