From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030580AbbKDPiK (ORCPT ); Wed, 4 Nov 2015 10:38:10 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:36836 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030597AbbKDPhN (ORCPT ); Wed, 4 Nov 2015 10:37:13 -0500 From: Joshua Clayton To: Alessandro Zummo , Alexandre Belloni Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, Joshua Clayton Subject: [PATCH 7/9] rtc-pcf2123: allow sysfs to accept hexidecimal Date: Wed, 4 Nov 2015 07:36:38 -0800 Message-Id: <986cb8f7ff0ed0584bab543b6cb90655ecd215c4.1446587705.git.stillcompiling@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pcf2123 registers store their values in bcd. sysfs sensibly displays them in hexidecimal. Up to now, the sysfs store functions only accept base 10, which makes no sense. Add support for hexidecimal without removing base10 support. Signed-off-by: Joshua Clayton --- drivers/rtc/rtc-pcf2123.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-pcf2123.c b/drivers/rtc/rtc-pcf2123.c index 4964d5c..6701e6d 100644 --- a/drivers/rtc/rtc-pcf2123.c +++ b/drivers/rtc/rtc-pcf2123.c @@ -178,7 +178,7 @@ static ssize_t pcf2123_store(struct device *dev, struct device_attribute *attr, if (ret) return ret; - ret = kstrtoul(buffer, 10, &val); + ret = kstrtoul(buffer, 0, &val); if (ret) return ret; -- 2.5.0