From patchwork Tue Mar 17 22:50:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 451167 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-qc0-x23f.google.com (mail-qc0-x23f.google.com [IPv6:2607:f8b0:400d:c01::23f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B23C11400D5 for ; Wed, 18 Mar 2015 09:50:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="2048-bit key; unprotected key" header.d=googlegroups.com header.i=@googlegroups.com header.b=lB5b/QVQ; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: by qcxm20 with SMTP id m20sf7763661qcx.0 for ; Tue, 17 Mar 2015 15:50:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe; bh=NjyNx3kXIwItS+nwiunX8Z0Wjq547XdWqjVIMdopA9g=; b=lB5b/QVQ7mGiAq3zmi3O1lNdTZrswSzPf4bC5ypjyo7EjXLmjve172HZdSdaxjs8C+ b+2uBlNKs5d+EbaXFbRu8+lwFW5cMJCjw3+HM0KThgAlfi4GBHQGjTwllqT/QKRyuBa7 4cuU+nuiZnnqDUojzGVXlvGeK6pyHd+NZMvem3PIge8rMfJeoB7mSYkXhcUM6owfC6UP tFcj7SqMOuF3I6mQRmimY0VZjoo5hrTyCD9ANRyPY0cMZ92wpBR4RIyH3HOADgBQDiRt VGmdqfxdeiFQqKnLRi8Y5/5atJtsjrsu7Ec+XK8n7bQEOqVihjB4PUyIuFygmbcgpuY2 UTgQ== X-Received: by 10.182.142.230 with SMTP id rz6mr576186obb.29.1426632640144; Tue, 17 Mar 2015 15:50:40 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.182.186.8 with SMTP id fg8ls191704obc.71.gmail; Tue, 17 Mar 2015 15:50:39 -0700 (PDT) X-Received: by 10.182.126.12 with SMTP id mu12mr77651672obb.13.1426632639825; Tue, 17 Mar 2015 15:50:39 -0700 (PDT) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by gmr-mx.google.com with ESMTPS id l3si2802872pdo.0.2015.03.17.15.50.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 15:50:39 -0700 (PDT) Received-SPF: pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) client-ip=140.211.169.12; Received: from akpm3.mtv.corp.google.com (unknown [216.239.45.95]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5C1AAAAE; Tue, 17 Mar 2015 22:50:39 +0000 (UTC) Date: Tue, 17 Mar 2015 15:50:38 -0700 From: Andrew Morton To: Lars-Peter Clausen Cc: Alessandro Zummo , Feng Tang , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [rtc-linux] Re: [PATCH] drivers/rtc/rtc-mrst: Fix suspend/resume Message-Id: <20150317155038.1194512ff8817b9079a81897@linux-foundation.org> In-Reply-To: <1426429109-17222-1-git-send-email-lars@metafoo.de> References: <1426429109-17222-1-git-send-email-lars@metafoo.de> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-Original-Sender: akpm@linux-foundation.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of akpm@linux-foundation.org designates 140.211.169.12 as permitted sender) smtp.mail=akpm@linux-foundation.org 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: , List-Unsubscribe: , On Sun, 15 Mar 2015 15:18:29 +0100 Lars-Peter Clausen wrote: > The Moorestown RTC driver implements suspend and resume callbacks and > assigns them to the suspend and resume fields of the device_driver struct. > These callbacks are never actually called by anything though. > > Modify the driver to properly use dev_pm_ops so that the suspend and resume > functions are actually executed upon suspend/resume. > > @@ -531,9 +533,8 @@ static struct platform_driver vrtc_mrst_platform_driver = { > .remove = vrtc_mrst_platform_remove, > .shutdown = vrtc_mrst_platform_shutdown, > .driver = { > - .name = (char *) driver_name, > - .suspend = mrst_suspend, > - .resume = mrst_resume, > + .name = (char *) driver_name, > + .pm = MRST_PM_OPS, > } The cast isn't needed? From: Andrew Morton Subject: drivers-rtc-rtc-mrst-fix-suspend-resume-fix device_driver.name is const char * Cc: Alessandro Zummo Cc: Feng Tang Cc: Lars-Peter Clausen Signed-off-by: Andrew Morton --- drivers/rtc/rtc-mrst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/rtc/rtc-mrst.c~drivers-rtc-rtc-mrst-fix-suspend-resume-fix drivers/rtc/rtc-mrst.c --- a/drivers/rtc/rtc-mrst.c~drivers-rtc-rtc-mrst-fix-suspend-resume-fix +++ a/drivers/rtc/rtc-mrst.c @@ -531,7 +531,7 @@ static struct platform_driver vrtc_mrst_ .remove = vrtc_mrst_platform_remove, .shutdown = vrtc_mrst_platform_shutdown, .driver = { - .name = (char *) driver_name, + .name = driver_name, .pm = MRST_PM_OPS, } };