From patchwork Sun Mar 6 15:27:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 592560 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-vk0-x23a.google.com (mail-vk0-x23a.google.com [IPv6:2607:f8b0:400c:c05::23a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 920811402D9 for ; Mon, 7 Mar 2016 02:28:25 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b=ZArTKszS; dkim-atps=neutral Received: by mail-vk0-x23a.google.com with SMTP id e6sf21311799vkh.1 for ; Sun, 06 Mar 2016 07:28:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=VMRBcsgF1XShsuJ4cf2fzgQT9VzKwb9XzS8S52Bv8Cs=; b=ZArTKszSe5l8hr9zVJLDt/pG1xGUJGMUvU+nghcikYRJIaRrbKwIXCVsb+EYr+1lyV US58uRa2vYBEfx1it/DST+1Y6TRZBbAQfyvf/Dnw+dikucoRH1UPYjae/vxIel9dOIb1 5DQB8T8hnxI4bL/WCXgV8tjDIbWLjjW83mpTe0YAwJw57b8ndcmpuFUlytC5zcJ9jOyr Zy5sxO4rCI77NM19Onv07XJ55ogF1jzCKUH06xMepvU6zaHx9gHKNdI0S0gfFvtKcHn8 dk8tqvoyRs8/0C8XHNQx5/oNJQXI3JNOgoYyt8Xjezrh2jcvUcx6rG4+NoHFNktP4FkM wdiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:to:cc:subject:date:message-id :in-reply-to:references:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe; bh=VMRBcsgF1XShsuJ4cf2fzgQT9VzKwb9XzS8S52Bv8Cs=; b=ZiImoD/VQPzQOGDYVsYDLy9xNonIfnU3KAdL7hEkKqBl16KBM7aAEEQ2M1dPaeNYWZ qHi4EEFwQJI8fqH9ath7PIzYuqvhWEZzs+Zy0JRM9nENiGAr70udLXsh9fwpJilwIvyZ d4ZZ3CiBB/zLMlvu/5E/IRC9uiFPnshRoSymjMEJkOVgTgQGbdL+k8rPvTlh34rX5PuI pPvehdMrH5PYpCROhDHNtG7jThCmfaJCw+m3J/O//xGQxy83k7vewfW7uIfu4WZMzmco cEiJt0hN0305U4iXkuVI5j6ye2zmtmoEnOJH/C+EfwF+eJiYR/EoCU/G8DKrDY+nqmYv Q7nA== X-Gm-Message-State: AD7BkJJXZqAPVO/sq/IIAlVFR8Gcxt6GjYFLQTC4HfZqcQJxn+6bJ07TuozeVqn40WO0EA== X-Received: by 10.50.155.34 with SMTP id vt2mr78445igb.0.1457278103706; Sun, 06 Mar 2016 07:28:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.107.63.2 with SMTP id m2ls641542ioa.14.gmail; Sun, 06 Mar 2016 07:28:23 -0800 (PST) X-Received: by 10.66.231.4 with SMTP id tc4mr13733473pac.14.1457278103486; Sun, 06 Mar 2016 07:28:23 -0800 (PST) Received: from mail-pa0-x241.google.com (mail-pa0-x241.google.com. [2607:f8b0:400e:c03::241]) by gmr-mx.google.com with ESMTPS id r75si2465645pfr.0.2016.03.06.07.28.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Mar 2016 07:28:23 -0800 (PST) Received-SPF: pass (google.com: domain of akinobu.mita@gmail.com designates 2607:f8b0:400e:c03::241 as permitted sender) client-ip=2607:f8b0:400e:c03::241; Received: by mail-pa0-x241.google.com with SMTP id 1so520481pal.3 for ; Sun, 06 Mar 2016 07:28:23 -0800 (PST) X-Received: by 10.67.5.9 with SMTP id ci9mr27173308pad.101.1457278103372; Sun, 06 Mar 2016 07:28:23 -0800 (PST) Received: from localhost.localdomain (KD113159139091.ppp-bb.dion.ne.jp. [113.159.139.91]) by smtp.gmail.com with ESMTPSA id g74sm18432196pfj.1.2016.03.06.07.28.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Mar 2016 07:28:22 -0800 (PST) From: Akinobu Mita To: rtc-linux@googlegroups.com Cc: Akinobu Mita , Alessandro Zummo , Alexandre Belloni , Dennis Aberilla Subject: [rtc-linux] [PATCH v4 5/7] rtc: ds3232: remove unused UIE code Date: Mon, 7 Mar 2016 00:27:51 +0900 Message-Id: <1457278073-11627-5-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457278073-11627-1-git-send-email-akinobu.mita@gmail.com> References: <1457278073-11627-1-git-send-email-akinobu.mita@gmail.com> X-Original-Sender: Akinobu.Mita@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of akinobu.mita@gmail.com designates 2607:f8b0:400e:c03::241 as permitted sender) smtp.mailfrom=akinobu.mita@gmail.com; dkim=pass header.i=@gmail.com; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: rtc-linux@googlegroups.com X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , UIE mode irqs are handled by the generic rtc core now. But there are remaining unused code fragments for it. Signed-off-by: Akinobu Mita Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: Dennis Aberilla --- * No changes from the previous version drivers/rtc/rtc-ds3232.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c index bb891b9..6016681 100644 --- a/drivers/rtc/rtc-ds3232.c +++ b/drivers/rtc/rtc-ds3232.c @@ -279,32 +279,14 @@ static int ds3232_update_alarm(struct device *dev, unsigned int enabled) struct ds3232 *ds3232 = dev_get_drvdata(dev); int control; int ret; - u8 buf[4]; mutex_lock(&ds3232->mutex); - ret = regmap_bulk_read(ds3232->regmap, DS3232_REG_ALARM1, buf, 4); - if (ret) - goto unlock; - - buf[0] = bcd2bin(buf[0]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? - 0x80 : buf[0]; - buf[1] = bcd2bin(buf[1]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? - 0x80 : buf[1]; - buf[2] = bcd2bin(buf[2]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? - 0x80 : buf[2]; - buf[3] = bcd2bin(buf[3]) < 0 || (ds3232->rtc->irq_data & RTC_UF) ? - 0x80 : buf[3]; - - ret = regmap_bulk_write(ds3232->regmap, DS3232_REG_ALARM1, buf, 4); - if (ret) - goto unlock; - ret = regmap_read(ds3232->regmap, DS3232_REG_CR, &control); if (ret) goto unlock; - if (enabled || (ds3232->rtc->irq_data & RTC_UF)) + if (enabled) /* enable alarm1 interrupt */ control |= DS3232_REG_CR_A1IE; else