From patchwork Tue Apr 21 08:39:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Wunner X-Patchwork-Id: 6246891 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4ACD09F6E2 for ; Tue, 21 Apr 2015 11:39:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 727C72041B for ; Tue, 21 Apr 2015 11:39:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3579120251 for ; Tue, 21 Apr 2015 11:39:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EF956E3DA; Tue, 21 Apr 2015 04:39:11 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout3.hostsharing.net (mailout3.hostsharing.net [176.9.242.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 246BE6E55E for ; Tue, 21 Apr 2015 04:39:10 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout3.hostsharing.net (Postfix) with ESMTPS id 8FACB1042BC29; Tue, 21 Apr 2015 13:31:37 +0200 (CEST) Received: from localhost (5-38-90-81.adsl.cmo.de [81.90.38.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id 22444603E04D; Tue, 21 Apr 2015 13:31:35 +0200 (CEST) X-Mailbox-Line: From 3697df8b7a08b627232fe826adec63b1d06ba1e8 Mon Sep 17 00:00:00 2001 Message-Id: <3697df8b7a08b627232fe826adec63b1d06ba1e8.1429610300.git.lukas@wunner.de> In-Reply-To: References: From: Lukas Wunner Date: Tue, 21 Apr 2015 10:39:45 +0200 Subject: [PATCH 07/11] Revert "vga_switcheroo: Add helper function to get the active client" To: dri-devel@lists.freedesktop.org Cc: Daniel Vetter , Seth Forshee , Matthew Garrett , Dave Airlie X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 26814ce68904c9faf977c90edac798156311981f. The helper function is no longer needed after Dave Airlie's rewrite of vga_switcheroo_switch_ddc(), the commit introducing it was only included because commit 31f23c3d488e43d61e5e812a1830a9ea5589df1d (drm/edid: Switch DDC when reading the EDID) does not compile without it. Signed-off-by: Lukas Wunner --- drivers/gpu/vga/vga_switcheroo.c | 14 -------------- include/linux/vga_switcheroo.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c index 2534d84..062fafe 100644 --- a/drivers/gpu/vga/vga_switcheroo.c +++ b/drivers/gpu/vga/vga_switcheroo.c @@ -214,20 +214,6 @@ find_active_client(struct list_head *head) return NULL; } -struct pci_dev *vga_switcheroo_get_active_client(void) -{ - struct vga_switcheroo_client *client; - struct pci_dev *pdev = NULL; - - mutex_lock(&vgasr_mutex); - client = find_active_client(&vgasr_priv.clients); - if (client) - pdev = client->pdev; - mutex_unlock(&vgasr_mutex); - return pdev; -} -EXPORT_SYMBOL(vga_switcheroo_get_active_client); - int vga_switcheroo_get_client_state(struct pci_dev *pdev) { struct vga_switcheroo_client *client; diff --git a/include/linux/vga_switcheroo.h b/include/linux/vga_switcheroo.h index 8963799..60c9d65 100644 --- a/include/linux/vga_switcheroo.h +++ b/include/linux/vga_switcheroo.h @@ -63,7 +63,6 @@ void vga_switcheroo_unregister_handler(void); int vga_switcheroo_process_delayed_switch(void); -struct pci_dev *vga_switcheroo_get_active_client(void); int vga_switcheroo_get_client_state(struct pci_dev *dev); void vga_switcheroo_set_dynamic_switch(struct pci_dev *pdev, enum vga_switcheroo_state dynamic); @@ -85,7 +84,6 @@ static inline int vga_switcheroo_register_audio_client(struct pci_dev *pdev, int id, bool active) { return 0; } static inline void vga_switcheroo_unregister_handler(void) {} static inline int vga_switcheroo_process_delayed_switch(void) { return 0; } -static inline struct pci_dev *vga_switcheroo_get_active_client(void) { return NULL; } static inline int vga_switcheroo_get_client_state(struct pci_dev *dev) { return VGA_SWITCHEROO_ON; } static inline void vga_switcheroo_set_dynamic_switch(struct pci_dev *pdev, enum vga_switcheroo_state dynamic) {}