From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwCqH-0001Hz-Iq for qemu-devel@nongnu.org; Mon, 17 Oct 2016 14:40:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwCqF-00018U-Sy for qemu-devel@nongnu.org; Mon, 17 Oct 2016 14:40:57 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:47358) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bwCqF-000106-NJ for qemu-devel@nongnu.org; Mon, 17 Oct 2016 14:40:55 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1bwCqE-00056s-QM for qemu-devel@nongnu.org; Mon, 17 Oct 2016 19:40:54 +0100 From: Peter Maydell Date: Mon, 17 Oct 2016 19:40:36 +0100 Message-Id: <1476729644-4595-18-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1476729644-4595-1-git-send-email-peter.maydell@linaro.org> References: <1476729644-4595-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 17/25] pxa2xx: Auto-assign name for i2c bus in i2c_init_bus. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Vijay Kumar B If a name is provided, the same name is assigned to both the I2C controllers. Leaving it NULL, causes names to be automatically assigned with an ID suffix, giving unique names to each controller. This helps us to uniquely identify each controller in the device tree, for example when adding an I2C device. Signed-off-by: Vijay Kumar B. Reviewed-by: Deepak S. Message-id: 1476351885-8905-1-git-send-email-vijaykumar@zilogic.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c index 0241e07..9898287 100644 --- a/hw/arm/pxa2xx.c +++ b/hw/arm/pxa2xx.c @@ -1505,7 +1505,7 @@ static void pxa2xx_i2c_initfn(Object *obj) PXA2xxI2CState *s = PXA2XX_I2C(obj); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); - s->bus = i2c_init_bus(dev, "i2c"); + s->bus = i2c_init_bus(dev, NULL); memory_region_init_io(&s->iomem, obj, &pxa2xx_i2c_ops, s, "pxa2xx-i2c", s->region_size); -- 2.7.4