From patchwork Tue Jun 23 11:09:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 223602 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80D9AC433DF for ; Tue, 23 Jun 2020 11:09:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A48B20771 for ; Tue, 23 Jun 2020 11:09:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="BCcgXjxK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732227AbgFWLJq (ORCPT ); Tue, 23 Jun 2020 07:09:46 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]:34597 "EHLO mail-40131.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732217AbgFWLJq (ORCPT ); Tue, 23 Jun 2020 07:09:46 -0400 Date: Tue, 23 Jun 2020 11:09:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1592910583; bh=twAyp3okr7kOUwXw1V0zgiy/sW5FRSDtzU2LxgNpArI=; h=Date:To:From:Cc:Reply-To:Subject:From; b=BCcgXjxKR/i/Wk7Lg+AP/wQU9CYm7lwjnWCZvfKrNyGFRkNyXf93czgX+hmRzsLbq GKLVJJgP0ETycDY/+PpsjDg84X+djkHgI7ZqxEv3fwKpSlwyRAgovuQ0zwHMnW31W1 WT9uSLmGXUtJCYYp0//YbueWdegUThGDooujg96aTk1GRjaYVLKsvMnOFq0zZ/4Nat 0C97ouZp6RbIcISEunxecl0L8VwDQJMfgvk/xG0KlO83U9jg7XknS7QXWm+QnY1m0i +EmKtdr1zQFOYtuz2pXkP4QJgmFlhbl9fRo+YRzxbcj/an7280MIQdzGnMFcGb6UHx LFkxWG+aenBXw== To: Amit Shah From: Alexander Lobakin Cc: Arnd Bergmann , Greg Kroah-Hartman , =?utf-8?q?Sjur_Br=C3=A6ndeland?= , Rusty Russell , Alexander Lobakin , virtualization@lists.linux-foundation.org, stable@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH resend] virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial Message-ID: MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org rproc_serial_id_table lacks an exposure to module devicetable, so when remoteproc firmware requests VIRTIO_ID_RPROC_SERIAL, no uevent is generated and no module autoloading occurs. Add missing MODULE_DEVICE_TABLE() annotation and move the existing one for VIRTIO_ID_CONSOLE right to the table itself. Fixes: 1b6370463e88 ("virtio_console: Add support for remoteproc serial") Cc: # v3.8+ Signed-off-by: Alexander Lobakin Reviewed-by: Amit Shah --- drivers/char/virtio_console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 00c5e3acee46..ca691bce9791 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2116,6 +2116,7 @@ static struct virtio_device_id id_table[] = { { VIRTIO_ID_CONSOLE, VIRTIO_DEV_ANY_ID }, { 0 }, }; +MODULE_DEVICE_TABLE(virtio, id_table); static unsigned int features[] = { VIRTIO_CONSOLE_F_SIZE, @@ -2128,6 +2129,7 @@ static struct virtio_device_id rproc_serial_id_table[] = { #endif { 0 }, }; +MODULE_DEVICE_TABLE(virtio, rproc_serial_id_table); static unsigned int rproc_serial_features[] = { }; @@ -2280,6 +2282,5 @@ static void __exit fini(void) module_init(init); module_exit(fini); -MODULE_DEVICE_TABLE(virtio, id_table); MODULE_DESCRIPTION("Virtio console driver"); MODULE_LICENSE("GPL");