From patchwork Thu Jul 22 17:07:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 484980 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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, 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 1CC60C63793 for ; Thu, 22 Jul 2021 17:07:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F052E61106 for ; Thu, 22 Jul 2021 17:07:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229928AbhGVQ04 (ORCPT ); Thu, 22 Jul 2021 12:26:56 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:51290 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229982AbhGVQ04 (ORCPT ); Thu, 22 Jul 2021 12:26:56 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id C66F0203E2; Thu, 22 Jul 2021 17:07:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1626973649; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=x3k96SXurbZA48P/lkQgfDs83i+1PSmUbdDIzs21Buk=; b=SbrGRviqO/5Rbp6K6cW4TA4BOuFqZUqU8rWIiMYYycR2iXits2kTms76YBo9n7WU47uvr1 UDKv8X0LWrhcgnal7Cpi+aLnmtmuivyFnOrai2egjZ6a5anQYv1qQZiFtuEsuyDhx8Gd6W reD6EpOUpU3IocwbHjN8iG92uw47lNU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1626973649; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=x3k96SXurbZA48P/lkQgfDs83i+1PSmUbdDIzs21Buk=; b=amAkSiUfcYAycWF5BcYuEPpJ/kUI4vnWa4L1wh1fSNqJJQJUKdD7cVsootjQyRsasadl2L SgFbzdwy2TvoxKCw== Received: from hawking.suse.de (hawking.suse.de [10.160.4.0]) by relay2.suse.de (Postfix) with ESMTP id BF7E5ADCDC; Thu, 22 Jul 2021 17:07:29 +0000 (UTC) Received: by hawking.suse.de (Postfix, from userid 17005) id B24D1445C89; Thu, 22 Jul 2021 19:07:29 +0200 (CEST) From: Andreas Schwab To: Marco Felsch Cc: broonie@kernel.org, linux-spi@vger.kernel.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org Subject: [PATCH] spi: update modalias_show after of_device_uevent_modalias support X-Yow: .. Do you like ``TENDER VITTLES?''? Date: Thu, 22 Jul 2021 19:07:29 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Commit 3ce6c9e2617e ("spi: add of_device_uevent_modalias support") is incomplete, as it didn't update the modalias_show function to generate the of: modalias string if available. Fixes: 3ce6c9e2617e ("spi: add of_device_uevent_modalias support") Signed-off-by: Andreas Schwab --- drivers/spi/spi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index c99181165321..e4dc593b1f32 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -58,6 +58,10 @@ modalias_show(struct device *dev, struct device_attribute *a, char *buf) const struct spi_device *spi = to_spi_device(dev); int len; + len = of_device_modalias(dev, buf, PAGE_SIZE); + if (len != -ENODEV) + return len; + len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1); if (len != -ENODEV) return len;