Received: from eggs.gnu.org ([2001:4830:134:3::10]:42828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bucZn-0000x3-6n for qemu-devel@nongnu.org; Thu, 13 Oct 2016 05:45:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bucZl-0000oI-B7 for qemu-devel@nongnu.org; Thu, 13 Oct 2016 05:45:22 -0400 From: Vijay Kumar B Date: Thu, 13 Oct 2016 15:14:45 +0530 Message-Id: <1476351885-8905-1-git-send-email-vijaykumar@zilogic.com> Subject: [Qemu-devel] [PATCH] pxa2xx: Auto-assign name for i2c bus in i2c_init_bus. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: balrogg@gmail.com, peter.maydell@linaro.org Cc: Vijay Kumar B , qemu-arm@nongnu.org, qemu-devel@nongnu.org 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. --- 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.1.4