From patchwork Fri Nov 24 17:53:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10076107 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 F3208602BD for ; Mon, 27 Nov 2017 08:36:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E169428CA0 for ; Mon, 27 Nov 2017 08:36:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D675F28DA6; Mon, 27 Nov 2017 08:36:10 +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=-3.3 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70C1328D9A for ; Mon, 27 Nov 2017 08:36:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 110546E26E; Mon, 27 Nov 2017 08:34:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from rere.qmqm.pl (78-11-180-123.static.ip.netia.com.pl [78.11.180.123]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0CE506E0E3 for ; Fri, 24 Nov 2017 18:02:48 +0000 (UTC) Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 3yk3hY5MlYz5F; Fri, 24 Nov 2017 18:53:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1511546013; bh=ozpuMkSLyO+FrZHPgKhSS/oolFH1MsSSMZ6oUWdMWGg=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=nrfE0Tm34dND7F1BC2yb7eQCuEabNl4w4LiOps3ftIZa1v2AVGQpXae1Q1vWmGw3R 5EJBeREgBeTNq1/ORms2i2vpagxPC79mEH8pQ9db/2dqYUAB+JkZJpJYGse2thBpFH sHH82MkQWVQNYGd668zlKPRSQdUw6HQLSGgR3EOlm6rP6SOPCgoMSxu7AFCwsP5dG+ TBkAY7imWvJTuQDYxRPMDMmKSA6wSKLamKdIoQ3TWNg3vfyXOeMS/J0GNBjvmiFzpU vagQHhM9Goe2voaAUFxKr1nSUmcbm+/VfVJKQJwTnFxpLKdRiPuAx2nxUkfZnvxwe3 TCdFZQfwiI0Kg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at rere Date: Fri, 24 Nov 2017 18:53:33 +0100 Message-Id: In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 09/13] staging: sm750fb: use simpler remove_conflicting_pci_framebuffers() MIME-Version: 1.0 To: dri-devel@lists.freedesktop.org X-Mailman-Approved-At: Mon, 27 Nov 2017 08:34:15 +0000 Cc: David Airlie , Sudip Mukherjee , Teddy Wang 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław --- drivers/staging/sm750fb/sm750.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 67207b0554cd..0590fc45c493 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1053,26 +1053,6 @@ static int sm750fb_frambuffer_alloc(struct sm750_dev *sm750_dev, int fbidx) return err; } -static int lynxfb_kick_out_firmware_fb(struct pci_dev *pdev) -{ - struct apertures_struct *ap; - bool primary = false; - - ap = alloc_apertures(1); - if (!ap) - return -ENOMEM; - - ap->ranges[0].base = pci_resource_start(pdev, 0); - ap->ranges[0].size = pci_resource_len(pdev, 0); -#ifdef CONFIG_X86 - primary = pdev->resource[PCI_ROM_RESOURCE].flags & - IORESOURCE_ROM_SHADOW; -#endif - remove_conflicting_framebuffers(ap, "sm750_fb1", primary); - kfree(ap); - return 0; -} - static int lynxfb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -1081,7 +1061,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev, int fbidx; int err; - err = lynxfb_kick_out_firmware_fb(pdev); + err = remove_conflicting_pci_framebuffers(pdev, 0, "sm750_fb1"); if (err) return err;