From patchwork Wed Jun 22 18:56:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9193525 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9EF336075F for ; Wed, 22 Jun 2016 19:04:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CD8C2840F for ; Wed, 22 Jun 2016 19:04:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8024B28415; Wed, 22 Jun 2016 19:04:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 653BB2840F for ; Wed, 22 Jun 2016 19:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751357AbcFVTEb (ORCPT ); Wed, 22 Jun 2016 15:04:31 -0400 Received: from 51.18-broadband.acttv.in ([106.51.18.144]:48996 "EHLO arvind-ThinkPad-Edge-E431" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750957AbcFVTEb (ORCPT ); Wed, 22 Jun 2016 15:04:31 -0400 X-Greylist: delayed 486 seconds by postgrey-1.27 at vger.kernel.org; Wed, 22 Jun 2016 15:04:30 EDT Received: by arvind-ThinkPad-Edge-E431 (Postfix, from userid 1000) id D7C0A4E2988; Thu, 23 Jun 2016 00:26:05 +0530 (IST) From: Arvind Yadav To: robert.moore@intel.com Cc: lv.zheng@intel.com, rafael.j.wysocki@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org, linux-kernel@vger.kernel.org, Arvind Yadav Subject: [PATCH] ACPI : Dummy acpi_video_register should return error code Date: Thu, 23 Jun 2016 00:26:01 +0530 Message-Id: <1466621761-7283-1-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The inline acpi_video_register stub simply allows compilation on systems with CONFIG_ACPI_VIDEO disabled. the dummy acpi_video_register does not register an acpi_bus_driver at all. The inline acpi_video_register should return to indicate lack of support when attempting to register an acpi_bus_driver on such a system with CONFIG_ACPI_VIDEO disabled. Signed-off-by: Arvind Yadav Reviewed-by: Aaron Lu --- include/acpi/video.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/video.h b/include/acpi/video.h index 5731ccb..4536bd3 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -54,7 +54,7 @@ extern int acpi_video_get_levels(struct acpi_device *device, struct acpi_video_device_brightness **dev_br, int *pmax_level); #else -static inline int acpi_video_register(void) { return 0; } +static inline int acpi_video_register(void) { return -ENODEV; } static inline void acpi_video_unregister(void) { return; } static inline int acpi_video_get_edid(struct acpi_device *device, int type, int device_id, void **edid)