From patchwork Sun Sep 16 23:45:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10601917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6F9E13AD for ; Sun, 16 Sep 2018 23:46:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D080E29340 for ; Sun, 16 Sep 2018 23:46:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C45122934F; Sun, 16 Sep 2018 23:46:11 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F62429340 for ; Sun, 16 Sep 2018 23:46:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 13C592677FF; Mon, 17 Sep 2018 01:46:06 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0F63726781A; Mon, 17 Sep 2018 01:46:03 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by alsa0.perex.cz (Postfix) with ESMTP id F3B262677FC for ; Mon, 17 Sep 2018 01:45:58 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id r196-v6so10087554iod.0 for ; Sun, 16 Sep 2018 16:45:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QcoflERtpbbMpFHGfNLZf+J44DqlCQNeE1IN/AfmCyw=; b=QZ5CW7Fo4X2d5dWSsyibw1FewzAcVLqIfsIhOn4Di1qz3uJz15hTqBNSl6D//5Ki9q Eaa02bx8tJ+CixARxakw8c9gpyXYVTtppksrkOPfobracWgN3WG1hQ9GI5FqP3FlMSxp Ny/RKE7IIEv1qOa3nF/AotMXlPtBYPZGF8GaI= 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; bh=QcoflERtpbbMpFHGfNLZf+J44DqlCQNeE1IN/AfmCyw=; b=uOiaFceXGOvJJiGfunPbKIqSCTu5vPfVy2MrdrwIbq57LxfHgij8adrOS5wPhvHfmO RHyM45v4kYoUQLxn5JpEpKJWEF/7GQmEnte9i9c+2p3d0wFA2Xp6uYerXPKQZrG3lAjS hK0AQtGHiyCxb4dovZCuMoDCYC571sNcCGmngAjjFU5hDHCuSLvYbjVMzreX76yvhtPL gQqWDAKcel+StjHrt+7aH2WjQfBLF73zzmXdiFep0VHBi1i3jMVBsc+DQlwgiObEvipx 5PLMcEhqXveHn2Ej0as1OM8k7HOqslEzFj1fNo7nFISa6w59sRy2OY6aD7QctC80ev2I F5NA== X-Gm-Message-State: APzg51Aw/TWDYLVfa//vQlI0CEQ2DLInqxn7f9eNrLN0xKIsfEFAuN/Q 9M53DfGEf2jsjL+VV1fZV2skdA== X-Google-Smtp-Source: ANB0VdZfaqPCa+jueB1u3F+i/YV6WKBSxekAl0eW6kTflKSfH9ugH2prhJyZ2i5B3D3T2T/EZe/Hjg== X-Received: by 2002:a6b:25d2:: with SMTP id l201-v6mr18710058iol.115.1537141558285; Sun, 16 Sep 2018 16:45:58 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id a11-v6sm4495177ioc.63.2018.09.16.16.45.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 16:45:57 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Date: Sun, 16 Sep 2018 16:45:40 -0700 Message-Id: <20180916234546.29661-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> References: <20180916234546.29661-1-srinivas.kandagatla@linaro.org> Cc: alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, broonie@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 1/7] slimbus: core: add support to uevent X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla This patch adds support to uevent to help automatic module loading. Signed-off-by: Srinivas Kandagatla --- drivers/slimbus/core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 95b00d2..31f2910 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include "slimbus.h" @@ -57,11 +58,24 @@ static int slim_device_remove(struct device *dev) return 0; } +static int slim_device_uevent(struct device *dev, struct kobj_uevent_env *env) +{ + struct slim_device *sbdev = to_slim_device(dev); + int ret; + + ret = of_device_uevent_modalias(dev, env); + if (ret != -ENODEV) + return ret; + + return add_uevent_var(env, "MODALIAS=slim:%s", dev_name(&sbdev->dev)); +} + struct bus_type slimbus_bus = { .name = "slimbus", .match = slim_device_match, .probe = slim_device_probe, .remove = slim_device_remove, + .uevent = slim_device_uevent, }; EXPORT_SYMBOL_GPL(slimbus_bus);