From patchwork Thu Jan 6 00:22:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 455831 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p060NQmu023393 for ; Thu, 6 Jan 2011 00:23:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752953Ab1AFAXC (ORCPT ); Wed, 5 Jan 2011 19:23:02 -0500 Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]:33665 "EHLO na3sys009aog113.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752248Ab1AFAXA (ORCPT ); Wed, 5 Jan 2011 19:23:00 -0500 Received: from source ([209.85.161.177]) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKTSULYbRSML900wrtE12oNQB/TX3VPOYr@postini.com; Wed, 05 Jan 2011 16:23:00 PST Received: by mail-gx0-f177.google.com with SMTP id 27so7228269gxk.36 for ; Wed, 05 Jan 2011 16:22:57 -0800 (PST) Received: by 10.90.86.17 with SMTP id j17mr1373922agb.10.1294273377194; Wed, 05 Jan 2011 16:22:57 -0800 (PST) Received: from localhost (c-24-18-179-55.hsd1.wa.comcast.net [24.18.179.55]) by mx.google.com with ESMTPS id t23sm26805190ano.6.2011.01.05.16.22.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 Jan 2011 16:22:56 -0800 (PST) From: Kevin Hilman To: linux-pm@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] PM: fix suspend_set_ops() to take const pointer Date: Wed, 5 Jan 2011 16:22:53 -0800 Message-Id: <1294273373-8967-1-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.3.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 06 Jan 2011 00:23:27 +0000 (UTC) diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 2669751..bb98383 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -122,7 +122,7 @@ struct platform_suspend_ops { * suspend_set_ops - set platform dependent suspend operations * @ops: The new suspend operations to set. */ -extern void suspend_set_ops(struct platform_suspend_ops *ops); +extern void suspend_set_ops(const struct platform_suspend_ops *ops); extern int suspend_valid_only_mem(suspend_state_t state); /** @@ -147,7 +147,7 @@ extern int pm_suspend(suspend_state_t state); #else /* !CONFIG_SUSPEND */ #define suspend_valid_only_mem NULL -static inline void suspend_set_ops(struct platform_suspend_ops *ops) {} +static inline void suspend_set_ops(const struct platform_suspend_ops *ops) {} static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; } #endif /* !CONFIG_SUSPEND */ diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c index ecf7705..0c0af3d 100644 --- a/kernel/power/suspend.c +++ b/kernel/power/suspend.c @@ -36,7 +36,7 @@ static struct platform_suspend_ops *suspend_ops; * suspend_set_ops - Set the global suspend method table. * @ops: Pointer to ops structure. */ -void suspend_set_ops(struct platform_suspend_ops *ops) +void suspend_set_ops(const struct platform_suspend_ops *ops) { mutex_lock(&pm_mutex); suspend_ops = ops;