From patchwork Tue Dec 19 20:59:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 10124395 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 CAFB16019C for ; Tue, 19 Dec 2017 21:08:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC8B1294C6 for ; Tue, 19 Dec 2017 21:08:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B1929295D7; Tue, 19 Dec 2017 21:08:52 +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,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 3AAA5294C6 for ; Tue, 19 Dec 2017 21:08:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752938AbdLSVIt (ORCPT ); Tue, 19 Dec 2017 16:08:49 -0500 Received: from mga04.intel.com ([192.55.52.120]:5086 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752812AbdLSVIr (ORCPT ); Tue, 19 Dec 2017 16:08:47 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2017 13:08:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,428,1508828400"; d="scan'208";a="13165645" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 19 Dec 2017 13:08:45 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 4E492387; Tue, 19 Dec 2017 22:59:58 +0200 (EET) From: Andy Shevchenko To: Alan Cox , Sakari Ailus , linux-media@vger.kernel.org, Greg Kroah-Hartman , devel@driverdev.osuosl.org, Kristian Beilke Cc: Andy Shevchenko Subject: [PATCH v1 07/10] staging: atomisp: Remove redundant PCI code Date: Tue, 19 Dec 2017 22:59:54 +0200 Message-Id: <20171219205957.10933-7-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171219205957.10933-1-andriy.shevchenko@linux.intel.com> References: <20171219205957.10933-1-andriy.shevchenko@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no need to keep a reference to PCI root bridge. Signed-off-by: Andy Shevchenko --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h | 1 - drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 8 -------- 2 files changed, 9 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h index 52a6f8002048..dc476a3dd271 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h @@ -227,7 +227,6 @@ struct atomisp_device { struct media_device media_dev; struct atomisp_platform_data *pdata; void *mmu_l1_base; - struct pci_dev *pci_root; const struct firmware *firmware; struct pm_qos_request pm_qos; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c index 7a9efc6847ca..548e00e7d67b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c @@ -1210,11 +1210,6 @@ static int atomisp_pci_probe(struct pci_dev *dev, isp->pdev = dev; isp->dev = &dev->dev; isp->sw_contex.power_state = ATOM_ISP_POWER_UP; - isp->pci_root = pci_get_bus_and_slot(0, 0); - if (!isp->pci_root) { - dev_err(&dev->dev, "Unable to find PCI host\n"); - return -ENODEV; - } isp->saved_regs.ispmmadr = start; rt_mutex_init(&isp->mutex); @@ -1494,7 +1489,6 @@ static int atomisp_pci_probe(struct pci_dev *dev, /* Address later when we worry about the ...field chips */ if (IS_ENABLED(CONFIG_PM) && atomisp_mrfld_power_down(isp)) dev_err(&dev->dev, "Failed to switch off ISP\n"); - pci_dev_put(isp->pci_root); return err; } @@ -1515,8 +1509,6 @@ static void atomisp_pci_remove(struct pci_dev *dev) pm_qos_remove_request(&isp->pm_qos); atomisp_msi_irq_uninit(isp, dev); - pci_dev_put(isp->pci_root); - atomisp_unregister_entities(isp); destroy_workqueue(isp->wdt_work_queue);