Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4506215ybc; Fri, 15 Nov 2019 05:51:58 -0800 (PST) X-Google-Smtp-Source: APXvYqzXlxz+xU/twV/dmbPR7fIj87PxQ1dAK6LjWVAD9AA4zIo1cfj/xk4vag6ecAMs2Y+LzrFH X-Received: by 2002:a1c:6588:: with SMTP id z130mr13448309wmb.87.1573825918530; Fri, 15 Nov 2019 05:51:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573825918; cv=none; d=google.com; s=arc-20160816; b=dNbwde7DSNMKe0I+cdu3c5KNURrQ3B5G/oshFZHiHfQ+YKLrm6nZhkV+qbQ5Lf/T6c 6CJ9lTTUYgXImPxm3DyEpwnPhI436nV60YPkI/4uiT8S7wp5AzEbQId57ZcWPMuR1B0x ykkww+LBd+ev31NRjmlf+WLTDSgeqh+OrWMMQHo1Mlfzp2l0UHMpnsIr7FlqLtDVOTjt 102JF0JYzF3GwT7cTNKjIX5qOFYTmZgkEJQBr81DfNz+mcYWeUpRtz21XMvCDCvpMOm2 2NhWnvbzq1zqtTujaGWnnHKxQvQSLmMqRryOuJALmQ4SxSvdU0PP9/MMt5IQSYQrQRkD m0zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=B5Of54WAILYpbaWPTiRDBYhFev2SO+yUEDiluAb/oog=; b=The01q1nIslnUiII//gg7X+2Ovv73j6FtwPtsWZr34oLOhDb3Jae1UCcCpxt+/LJwm lIOQptoM+d805Nk+Bj0HW7LpU+iZZU2FWuDORmo8Ho3U2m84ENMtFhPwawKPYdr7HvxF XjPqMo8x8GCe1iuJ0rBkC5WDU2WDh59kNnAC/7CuBYSC0n+NW/Ls8wSX1dhsHIvY/PEG Z5KeFu8tKR2prG8Re/kGpocGu8i0Y9+Gmslhx+ur8YUg4Md5uO6kPvvswOzyA4KRyu3d OQcN7oYcD+rec8uapytNJVeKYNbYJSrYKrgWEU5hD01mK9DiYyB32uqhCtDq4KBomkBs ttig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=KKjjUIuh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bo21si5839845edb.137.2019.11.15.05.51.33; Fri, 15 Nov 2019 05:51:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@9elements.com header.s=google header.b=KKjjUIuh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=9elements.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727643AbfKONuJ (ORCPT + 99 others); Fri, 15 Nov 2019 08:50:09 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54734 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727380AbfKONuJ (ORCPT ); Fri, 15 Nov 2019 08:50:09 -0500 Received: by mail-wm1-f67.google.com with SMTP id z26so9707174wmi.4 for ; Fri, 15 Nov 2019 05:50:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B5Of54WAILYpbaWPTiRDBYhFev2SO+yUEDiluAb/oog=; b=KKjjUIuhNrEuXAQXUboOF7sYFDkh7fgUbv6MtYgWqSuf1VvMKFnPFIH2t69k61Ozbf g5iGtrirMXGGfHhzME6CR1ubIUe4imCzug1VtyZfN7obTZbJ3m3fCMhzdUjYw9jcBEsX 4no1r1p4TYTNHbVVGEL5TPi4QriYNwAIEv/2NlMGvfHveV5Jd9cS1vLixfgkKVR3OM93 S4XWRAttutfw1PIlPq4y4vDzXDy8ZURX62ChvpkD3pbOGD/Tmiw79XBhBLKuiQemuCmr MChAurhlEAgHZa3srYof6BjkEpMBDAop65Jzi905wWt2zfhg7kL+a1voHflU4kl6CUie Ddhw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=B5Of54WAILYpbaWPTiRDBYhFev2SO+yUEDiluAb/oog=; b=RQPWjNSeK8WwaOwARBj5GSE/vGuT15LDYmiBnoXD2T8vEylT3JkaYXW5TpM7jOKGmA ar3JrO5XX2+7kSGrL43QR64iP43D+cZyniGszLb9d5TOpNQDcCyVWJbfJt5pogbwTtbQ TQRcU4WxABIKiYDmisl7ei36aHKUoZYavQb1Jq66rYtH+FRvow8CPVDu4hWzP4P6DNUU 5sfa3/Wq9X/XGv7/uFlnppL4DrA/NyZBST8M65Vkg9mx5Byj8mqjJfRj30VHKTWbffAT tit2sZEDnu3Ihfxua9gQxPnwnW60zsdEgsXItv8qkOUBTvRlg+Rjg1LY+0PQUK1QAhEw 24Uw== X-Gm-Message-State: APjAAAUIk5WEuuuji3xKKb0nXLsBID+SAVGL20JZRO9/OdeUnuvr8FLh z3WlmRHYqN/6cP3Amj5IRyIRIdTC+xv3rV+V X-Received: by 2002:a1c:80c7:: with SMTP id b190mr15141266wmd.3.1573825806541; Fri, 15 Nov 2019 05:50:06 -0800 (PST) Received: from localhost.localdomain (ip-94-114-101-228.unity-media.net. [94.114.101.228]) by smtp.gmail.com with ESMTPSA id f14sm11119906wrv.17.2019.11.15.05.50.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2019 05:50:05 -0800 (PST) From: patrick.rudolph@9elements.com To: linux-kernel@vger.kernel.org Cc: coreboot@coreboot.org, patrick.rudolph@9elements.com, Allison Randal , Greg Kroah-Hartman , Thomas Gleixner , Alexios Zavras , Arthur Heymans Subject: [PATCH 1/3] firmware: google: Release devices before unregistering the bus Date: Fri, 15 Nov 2019 14:48:37 +0100 Message-Id: <20191115134842.17013-2-patrick.rudolph@9elements.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191115134842.17013-1-patrick.rudolph@9elements.com> References: <20191115134842.17013-1-patrick.rudolph@9elements.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Patrick Rudolph Fix a bug where the kernel module can't be loaded after it has been unloaded as the devices are still present and conflicting with the to be created coreboot devices. Signed-off-by: Patrick Rudolph --- drivers/firmware/google/coreboot_table.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c index 8d132e4f008a..88c6545bebf4 100644 --- a/drivers/firmware/google/coreboot_table.c +++ b/drivers/firmware/google/coreboot_table.c @@ -163,8 +163,14 @@ static int coreboot_table_probe(struct platform_device *pdev) return ret; } +static int __cb_dev_unregister(struct device *dev, void *dummy) +{ + device_unregister(dev); +} + static int coreboot_table_remove(struct platform_device *pdev) { + bus_for_each_dev(&coreboot_bus_type, NULL, NULL, __cb_dev_unregister); bus_unregister(&coreboot_bus_type); return 0; } -- 2.21.0