linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Feng Tang <feng.tang@intel.com>
To: ben-linux@fluff.org, khali@linux-fr.org,
	tomoya-linux@dsn.lapis-semi.com, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: joel.clark@intel.com, Feng Tang <feng.tang@intel.com>
Subject: [PATCH 2/2] i2c-eg20t: use i2c_add_numbered_adapter to get a fixed bus number
Date: Tue, 29 Nov 2011 15:19:11 +0800	[thread overview]
Message-ID: <1322551151-28580-2-git-send-email-feng.tang@intel.com> (raw)
In-Reply-To: <1322551151-28580-1-git-send-email-feng.tang@intel.com>

For EG20T and ML7213 IOH, the i2c controller numbers are fixed, using
fixed bus number will make it much easier for platform code to use
i2c_register_board_info() to register i2c devices.

Signed-off-by: Feng Tang <feng.tang@intel.com>
---
 drivers/i2c/busses/i2c-eg20t.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c
index 18936ac..079435b 100644
--- a/drivers/i2c/busses/i2c-eg20t.c
+++ b/drivers/i2c/busses/i2c-eg20t.c
@@ -918,7 +918,9 @@ static int __devinit pch_i2c_probe(struct pci_dev *pdev,
 		pch_adap->dev.parent = &pdev->dev;
 
 		pch_i2c_init(&adap_info->pch_data[i]);
-		ret = i2c_add_adapter(pch_adap);
+
+		pch_adap->nr = i;
+		ret = i2c_add_numbered_adapter(pch_adap);
 		if (ret) {
 			pch_pci_err(pdev, "i2c_add_adapter[ch:%d] FAILED\n", i);
 			goto err_add_adapter;
-- 
1.7.1

      reply	other threads:[~2011-11-29  7:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29  7:19 [PATCH 1/2] i2c-eg20t: correct the driver init order of pch_i2c_probe() Feng Tang
2011-11-29  7:19 ` Feng Tang [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=1322551151-28580-2-git-send-email-feng.tang@intel.com \
    --to=feng.tang@intel.com \
    --cc=ben-linux@fluff.org \
    --cc=joel.clark@intel.com \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomoya-linux@dsn.lapis-semi.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).