From patchwork Fri Sep 30 20:56:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Anders X-Patchwork-Id: 117210 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-yx0-f184.google.com (mail-yx0-f184.google.com [209.85.213.184]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 5290FB6F6F for ; Sat, 1 Oct 2011 06:56:15 +1000 (EST) Received: by yxl11 with SMTP id 11sf2964073yxl.11 for ; Fri, 30 Sep 2011 13:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:from:to:cc:subject:date:message-id :x-mailer:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=fe0rjXdz9OJqRjjRohr5K6ZhI7kfhdQ2CKLEx8/Py1s=; b=y27eTsmZLMy5Gp008Nu7TMgIvcgAk8X9UlNZhDNgkNU/AfHTUN/P+sA3k9ZNxm90EG Xt9m+eLrBbEQZW6PwrV0jVfI4rVuWWQYtTHn+cAugaEJFKKBiAZ1H+CC/GAdVCv8ymB/ C5WFou2JxxsO3hMWDS0y1Hjg0p8qmn5c1Z0sA= Received: by 10.236.22.225 with SMTP id t61mr10174065yht.16.1317416171244; Fri, 30 Sep 2011 13:56:11 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.101.59.3 with SMTP id m3ls9273170ank.1.gmail; Fri, 30 Sep 2011 13:56:10 -0700 (PDT) Received: by 10.236.77.232 with SMTP id d68mr22667952yhe.8.1317416170781; Fri, 30 Sep 2011 13:56:10 -0700 (PDT) Received: by 10.236.77.232 with SMTP id d68mr22667951yhe.8.1317416170769; Fri, 30 Sep 2011 13:56:10 -0700 (PDT) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com. [192.94.94.40]) by gmr-mx.google.com with ESMTPS id y45si1883929yhl.1.2011.09.30.13.56.10 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Sep 2011 13:56:10 -0700 (PDT) Received-SPF: pass (google.com: domain of danders@jayabharathlocal.am.dhcp.ti.com designates 192.94.94.40 as permitted sender) client-ip=192.94.94.40; Received: from dlep34.itg.ti.com ([157.170.170.115]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p8UKu9Zc015789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2011 15:56:09 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep34.itg.ti.com (8.13.7/8.13.8) with ESMTP id p8UKu9eN012831; Fri, 30 Sep 2011 15:56:09 -0500 (CDT) Received: from DFLE70.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p8UKu9sW015209; Fri, 30 Sep 2011 15:56:09 -0500 (CDT) Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle70.ent.ti.com (128.247.5.40) with Microsoft SMTP Server id 14.1.323.3; Fri, 30 Sep 2011 15:56:09 -0500 Received: from ccd-dev (ccd-dev.am.dhcp.ti.com [128.247.77.58]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id p8UKu96Y020545; Fri, 30 Sep 2011 15:56:09 -0500 Received: from danders by ccd-dev with local (Exim 4.71) (envelope-from ) id 1R9k7s-00069j-Rr; Fri, 30 Sep 2011 15:56:08 -0500 From: David Anders To: CC: , , David Anders Subject: [rtc-linux] [PATCH] rtc: ds1307: comment and format cleanup Date: Fri, 30 Sep 2011 15:56:08 -0500 Message-ID: <1317416168-23637-1-git-send-email-x0132446@ti.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-Original-Sender: x0132446@ti.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of danders@jayabharathlocal.am.dhcp.ti.com designates 192.94.94.40 as permitted sender) smtp.mail=danders@jayabharathlocal.am.dhcp.ti.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-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , this patch cleans up some comment and formating issues that were reported via checkpatch.pl Signed-off-by: David Anders --- drivers/rtc/rtc-ds1307.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 2a98601..811e870 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -37,7 +37,7 @@ enum ds_type { mcp7941x, rx_8025, last_ds_type /* always last */ - // rs5c372 too? different address... + /* rs5c372 too? different address... */ }; @@ -366,6 +366,10 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t) | DS1340_BIT_CENTURY; break; case mcp7941x: + /* these bits were cleared when preparing the date/time + * values and need to be set again before writing the + * buffer out to the device. + */ buf[DS1307_REG_SECS] |= MCP7941X_BIT_ST; buf[DS1307_REG_WDAY] |= MCP7941X_BIT_VBATEN; break; @@ -624,7 +628,8 @@ static int __devinit ds1307_probe(struct i2c_client *client, && !i2c_check_functionality(adapter, I2C_FUNC_SMBUS_I2C_BLOCK)) return -EIO; - if (!(ds1307 = kzalloc(sizeof(struct ds1307), GFP_KERNEL))) + ds1307 = kzalloc(sizeof(struct ds1307), GFP_KERNEL); + if (!(ds1307)) return -ENOMEM; i2c_set_clientdata(client, ds1307);