From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Herrenschmidt Subject: Re: [PATCH] radeonfb: Give i2c buses nicer names Date: Fri, 06 Jun 2008 19:21:37 +1000 Message-ID: <1212744097.12464.29.camel@pasglop> References: <20080606111955.5583e81a@hyperion.delvare> Reply-To: benh@kernel.crashing.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list1-new.sourceforge.net with esmtp (Exim 4.43) id 1K4Y8o-00087A-2a for linux-fbdev-devel@lists.sourceforge.net; Fri, 06 Jun 2008 02:22:03 -0700 Received: from gate.crashing.org ([63.228.1.57] ident=[U2FsdGVkX18OkIC5dYG3dvk6RQ8mv/XyHeojhCjuf08=]) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1K4Y8m-0000wo-IU for linux-fbdev-devel@lists.sourceforge.net; Fri, 06 Jun 2008 02:21:46 -0700 In-Reply-To: <20080606111955.5583e81a@hyperion.delvare> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-fbdev-devel-bounces@lists.sourceforge.net Errors-To: linux-fbdev-devel-bounces@lists.sourceforge.net To: Jean Delvare Cc: linux-fbdev-devel@lists.sourceforge.net On Fri, 2008-06-06 at 11:19 +0200, Jean Delvare wrote: > The name of the i2c buses shows in the output of "i2cdetect -l", so > it's important to give informative names. > > Signed-off-by: Jean Delvare Acked-by: Benjamin Herrenschmidt > --- > drivers/video/aty/radeon_i2c.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > --- linux-2.6.26-rc5.orig/drivers/video/aty/radeon_i2c.c 2008-06-03 09:57:31.000000000 +0200 > +++ linux-2.6.26-rc5/drivers/video/aty/radeon_i2c.c 2008-06-06 08:43:51.000000000 +0200 > @@ -69,7 +69,8 @@ static int radeon_setup_i2c_bus(struct r > { > int rc; > > - strcpy(chan->adapter.name, name); > + snprintf(chan->adapter.name, sizeof(chan->adapter.name), > + "radeonfb %s", name); > chan->adapter.owner = THIS_MODULE; > chan->adapter.id = I2C_HW_B_RADEON; > chan->adapter.algo_data = &chan->algo; > > ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php