From patchwork Fri Mar 3 10:34:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9602507 X-Patchwork-Delegate: kvalo@adurom.com 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 98DFE6016C for ; Fri, 3 Mar 2017 10:37:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 89FF12793A for ; Fri, 3 Mar 2017 10:37:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7BCC528478; Fri, 3 Mar 2017 10:37:06 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 ECA1D2793A for ; Fri, 3 Mar 2017 10:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbdCCKfK (ORCPT ); Fri, 3 Mar 2017 05:35:10 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:36408 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751673AbdCCKel (ORCPT ); Fri, 3 Mar 2017 05:34:41 -0500 Received: by mail-lf0-f67.google.com with SMTP id g70so6712972lfh.3 for ; Fri, 03 Mar 2017 02:34:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A4t4LRY9UL6kq3Bm8w9wIwO+FKK6C83kcjysiVckRFk=; b=lAGF2i80YXqsVlQ0EdSxjIA24f2CKdEdYb1Qj0LENZipXzoxqOCKkN8iScjUe2jBvn zHGBwOuWbKFW2lzJsdxvMDL78AlGpVk1D/jdEf6e4UJqYKLTF0NpZfo1dCUvg4ge50fg iByHxqcaj7p6VAbtR2pIPB1FBj0OKCM4lYx2MrwhQiEWBlD7paTp3tv0SqissQ7z3YSO FRD7hq7A5Iulfbuf0ezIrsw+wa0JkdKsCzupBpsvdv4DGHyrI3A/JhtM7SvXWoIuK5U+ JbZeVl49DG5pSNFj1rOqRL+hjYQnML5OlFJ14+AiTWBiADUkQTXA/4DCADz5PxWLZ5Bf 5t8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=A4t4LRY9UL6kq3Bm8w9wIwO+FKK6C83kcjysiVckRFk=; b=p+hIszgha7V5GMAec8S0offpSARZtdp1MrtDc+7NYRQ/pFoO0tNP4eXuizgMhjBqj0 axn7tbv78osQqx2Vb+OlqVH1yMjw0IclGJz3zvFhCkTNtR0cQQOESGz7MoQtx4VNFaHe ZuPWIAKVqyl/F5qfeGiu8EbinwGLdPOqa/UkPrJR5s41I03VmdonrnWTugchyULmRN4E Fo6VbAbcABUOQlvkrvL0IW0Ip8SdEJ4f2KTrRqAuLOE1JidftnGEIXIKGtWWYecJXUlv sfhhJYSvE2FQSGjr01jwAQPo7gziPSE4DUZaREjIblsQ9+Nij0/O5JVIBTWlTrC1tdPX 2piQ== X-Gm-Message-State: AMke39meZte7a2fjxPsZw+H9wXMXUCE9yP5/jHff/B5mJaw8WDF035/Pm7LIcU4a7DBtUA== X-Received: by 10.46.82.132 with SMTP id n4mr744420lje.125.1488537263051; Fri, 03 Mar 2017 02:34:23 -0800 (PST) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id y29sm2227970ljd.41.2017.03.03.02.34.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Mar 2017 02:34:22 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo , linux-wireless@vger.kernel.org Cc: Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH 4.12 1/2] bcma: use helper function to set core dev's parent Date: Fri, 3 Mar 2017 11:34:14 +0100 Message-Id: <20170303103415.5188-1-zajec5@gmail.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafał Miłecki A tiny code deduplication thanks to the bcma_bus_get_host_dev. Signed-off-by: Rafał Miłecki --- drivers/bcma/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 12da68ec48ba..4f88821c1b2a 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c @@ -242,17 +242,16 @@ void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core) core->dev.release = bcma_release_core_dev; core->dev.bus = &bcma_bus_type; dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index); + core->dev.parent = bcma_bus_get_host_dev(bus); switch (bus->hosttype) { case BCMA_HOSTTYPE_PCI: - core->dev.parent = &bus->host_pci->dev; core->dma_dev = &bus->host_pci->dev; core->irq = bus->host_pci->irq; break; case BCMA_HOSTTYPE_SOC: if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) { core->dma_dev = &bus->host_pdev->dev; - core->dev.parent = &bus->host_pdev->dev; if (core->dev.parent) bcma_of_fill_device(core->dev.parent, core); } else {