From patchwork Sat Apr 27 02:54:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jingoo Han X-Patchwork-Id: 2496361 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 86A2BDF230 for ; Sat, 27 Apr 2013 02:54:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756057Ab3D0Cyx (ORCPT ); Fri, 26 Apr 2013 22:54:53 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:65239 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753894Ab3D0Cyw (ORCPT ); Fri, 26 Apr 2013 22:54:52 -0400 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MLW0093K83FIQ60@mailout3.samsung.com>; Sat, 27 Apr 2013 11:54:51 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [203.254.230.47]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id EC.CF.31024.AFD3B715; Sat, 27 Apr 2013 11:54:50 +0900 (KST) X-AuditID: cbfee68d-b7f016d000007930-b9-517b3dfa6fbb Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 99.95.01422.AFD3B715; Sat, 27 Apr 2013 11:54:50 +0900 (KST) Received: from DOJG1HAN03 ([12.23.120.99]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MLW001GQ83E0FA0@mmp1.samsung.com>; Sat, 27 Apr 2013 11:54:50 +0900 (KST) From: Jingoo Han To: 'Andrew Morton' Cc: linux-kernel@vger.kernel.org, 'Len Brown' , 'Pavel Machek' , "'Rafael J. Wysocki'" , linux-pm@vger.kernel.org, Jingoo Han Subject: [PATCH] PM: Add pm_ops_ptr() macro Date: Sat, 27 Apr 2013 11:54:50 +0900 Message-id: <000001ce42f2$96128cc0$c237a640$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-index: Ac5C8o6cbQXPVHyVQgC21Tqr9UQ2BA== Content-language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrIIsWRmVeSWpSXmKPExsVy+t8zfd1fttWBBs0nbCzmrF/DZvHykKbF 5YWXWC1mTdnLZHF51xw2i8+9Rxgt7p46ymbRv7CXyYHDY/Gel0weJ2b8ZvHo27KK0ePR4hZG jxWrv7N7fN4kF8AWxWWTkpqTWZZapG+XwJWx/5BywUXWivXPMhsYj7N0MXJySAiYSLz/8oER whaTuHBvPVsXIxeHkMAyRoktX78ywRSd6XsPlVjEKLHr7ltGCOcXo8TBx4fAqtgE1CS+fDnM 3sXIwSEioC/R1qIBUsMscJxRYumF9ywgcWEBbYl1H6NAylkEVCW2d81iA7F5BSwlWj98hLIF JX5Mvgd2HbOAlsT6nceZIGx5ic1r3jJDHKQgsePsa7CrRQT0JGb+3McOUSMise/FO7DbJARu sUss3rWFDWKZgMS3yYfAbpAQkJXYdABqjqTEwRU3WCYwis1CsnoWktWzkKyehWTFAkaWVYyi qQXJBcVJ6UWGesWJucWleel6yfm5mxgh0dm7g/H2AetDjMlA6ycyS4km5wOjO68k3tDYzMjC 1MTU2Mjc0ow0YSVxXrUW60AhgfTEktTs1NSC1KL4otKc1OJDjEwcnFINjPcv2D/Y9W0K++/X l8/ODIwKNfnbffNqRQvrUlMemeQjZSL+Kcv4Ns23fWsl/G1PH9fL+XwK7mfei85+tqthiRBf 5/J7Wqw3m8VPFzDze/GzMftrXOtb+Uf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Reflected Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Add pm_ops_ptr() macro that allows the .pm entry in the driver structures to be assigned without having an #define xxx NULL for the case that PM is not enabled. Signed-off-by: Jingoo Han --- include/linux/pm.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/pm.h b/include/linux/pm.h index a224c7f..bd50d15 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -55,8 +55,10 @@ struct device; #ifdef CONFIG_PM extern const char power_group_name[]; /* = "power" */ +#define pm_ops_ptr(_ptr) (_ptr) #else #define power_group_name NULL +#define pm_ops_ptr(_ptr) NULL #endif typedef struct pm_message {