Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751636AbbGML15 (ORCPT ); Mon, 13 Jul 2015 07:27:57 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34981 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751239AbbGML1y (ORCPT ); Mon, 13 Jul 2015 07:27:54 -0400 From: Krzysztof Kozlowski To: David Woodhouse , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, linux-pm@vger.kernel.org, Bryan Wu , Richard Purdie , Jacek Anaszewski , linux-leds@vger.kernel.org Cc: Chanwoo Choi , MyungJoo Ham , Dmitry Torokhov , Samuel Ortiz , Lee Jones , Sebastian Reichel , Dmitry Eremin-Solenikov , Krzysztof Kozlowski Subject: [PATCH v4 2/9] mfd: max77693: Store I2C device type as enum and add default unknown Date: Mon, 13 Jul 2015 20:26:51 +0900 Message-Id: <1436786818-14115-3-git-send-email-k.kozlowski.k@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1436786818-14115-1-git-send-email-k.kozlowski.k@gmail.com> References: <1436786818-14115-1-git-send-email-k.kozlowski.k@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1435 Lines: 51 Store the device type (obtained from i2c_device_id) as an enum and add a default type of unknown to distinguish from case when this is not set at all. Signed-off-by: Krzysztof Kozlowski Acked-by: Lee Jones --- include/linux/mfd/max77693-private.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h index ad67b8235a8d..e3c0afff38d3 100644 --- a/include/linux/mfd/max77693-private.h +++ b/include/linux/mfd/max77693-private.h @@ -529,13 +529,18 @@ enum max77693_irq_muic { MAX77693_MUIC_IRQ_NR, }; +enum max77693_types { + TYPE_MAX77693_UNKNOWN, + TYPE_MAX77693, +}; + struct max77693_dev { struct device *dev; struct i2c_client *i2c; /* 0xCC , PMIC, Charger, Flash LED */ struct i2c_client *muic; /* 0x4A , MUIC */ struct i2c_client *haptic; /* 0x90 , Haptic */ - int type; + enum max77693_types type; struct regmap *regmap; struct regmap *regmap_muic; @@ -549,8 +554,4 @@ struct max77693_dev { int irq; }; -enum max77693_types { - TYPE_MAX77693, -}; - #endif /* __LINUX_MFD_MAX77693_PRIV_H */ -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/