From patchwork Mon Jul 16 07:47:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ohad Ben Cohen X-Patchwork-Id: 1200131 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9D6C63FD9C for ; Mon, 16 Jul 2012 07:47:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751723Ab2GPHr1 (ORCPT ); Mon, 16 Jul 2012 03:47:27 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:53637 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751440Ab2GPHrZ (ORCPT ); Mon, 16 Jul 2012 03:47:25 -0400 Received: by vcbfk26 with SMTP id fk26so658860vcb.19 for ; Mon, 16 Jul 2012 00:47:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:x-gm-message-state; bh=6pGqu1rmhC/MPBaqU0jLxiePRlJY9fBnWhkkcb17buA=; b=OIVD+L/Zs27WFg6ksy5HOE1DVJktXuSfq9DPQKnm0MpIyDZzeS4ZJe97dXxNpSfciA qRnVw2dtL/5WhL38Xgp+41yLazSNAjKv5rwp0ZOND/kVRsYZRZkUcDoG1Uf97XBgSPFF enIQasskVX/CEC+OQ/DP/2qzFBarXLsak/g2/8+jepJCqnSqycQDpqg5esm5sbua5/JZ BO916zuwWqDXnzgnw/eb2iQ839Uphd+/UDUxnKY6TFNfuVlRUKpufYp5kNYsGC7hhEeN G2uhzjFHeuJDdjrJmmTCFLY5QkpZ4tFxJUmMHjBCPQEEyB1UTk93hY/icpy8wsdclUnn NjUw== Received: by 10.220.220.201 with SMTP id hz9mr4821413vcb.30.1342424844931; Mon, 16 Jul 2012 00:47:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.162.197 with HTTP; Mon, 16 Jul 2012 00:47:03 -0700 (PDT) X-Originating-IP: [46.116.44.123] In-Reply-To: References: <1341936444-3094-1-git-send-email-fuga@studiofuga.com> <485F7F7C-2D0C-4B14-8A46-D42C9F8ED4E4@studiofuga.com> <47AF0F55-39D1-4B7E-BE0E-D2395989322D@studiofuga.com> From: Ohad Ben-Cohen Date: Mon, 16 Jul 2012 10:47:03 +0300 Message-ID: Subject: Re: [PATCH] rpmsg bus subsys_initcall initialization ordering To: Federico Fuga Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org X-Gm-Message-State: ALoCoQkYbjwgRKy7fcXqjFQ8zPlLKp2bvHX2pjQCIHeHLhhJAmMyA6BBVRebkgR1tSd5N7oSrRdj Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Hi Federico, On Fri, Jul 13, 2012 at 9:00 PM, Ohad Ben-Cohen wrote: > I agree. I'll take it, but will change the commit log to make it > omaprpc-agnostic. Here's what I'm going to apply: commit 913552b8c7a0f06cc1bff27f8e9953bffe6a1817 Author: Federico Fuga Date: Mon Jul 16 10:36:51 2012 +0300 rpmsg: fix dependency on initialization order When rpmsg drivers are built into the kernel, they must not initialize before the rpmsg bus does, otherwise they'd trigger a BUG() in drivers/base/driver.c line 169 (driver_register()). To fix that, and to stop depending on arbitrary linkage ordering of those built-in rpmsg driver, we let the rpmsg bus initialize at subsys_initcall. Signed-off-by: Federico Fuga [ohad: rewrite the commit log] Signed-off-by: Ohad Ben-Cohen --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 0af7fd3..e564a01 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c @@ -1104,7 +1104,7 @@ static int __init rpmsg_init(void) return ret; } -module_init(rpmsg_init); +subsys_initcall(rpmsg_init); static void __exit rpmsg_fini(void) {