From patchwork Thu Mar 28 13:41:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10875015 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 540391390 for ; Thu, 28 Mar 2019 13:43:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AC5728B78 for ; Thu, 28 Mar 2019 13:43:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EF6928B8B; Thu, 28 Mar 2019 13:43:57 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 78EE628B78 for ; Thu, 28 Mar 2019 13:43:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2E345871; Thu, 28 Mar 2019 14:43:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E345871 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1553780634; bh=p7PwyJbzPS6ZtPWSbPMyjqbjuNEteXZ0cBTV3CEzk10=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ctLB/DMks4foaMAA/lkiQkMXSlCHKzMMGocOjcdE1E/nPlt8j7go3kowQj36KKMgq TALIidJotYfPdItf0LhnCeRyjoZr74Z4tZmmV7VPZoXilsx4lCVGiY32Amq/wOkY74 /9CA4M6877et7Y705W4sTgNWJy6/RSfOgj7dFWEc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6DC54F89715; Thu, 28 Mar 2019 14:42:08 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id A6138F80C16; Thu, 28 Mar 2019 14:42:06 +0100 (CET) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2B3E5F80C16 for ; Thu, 28 Mar 2019 14:42:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2B3E5F80C16 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FDpgkAHX" Received: by mail-wm1-x344.google.com with SMTP id a184so3638430wma.2 for ; Thu, 28 Mar 2019 06:42:01 -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 :mime-version:content-transfer-encoding; bh=iQO9sfNdqBwlZInREZDsg0LeWlaj29IFGs5mv31i9qA=; b=FDpgkAHXVO1+bfCyJDnlUYVqf+Vs58302AZ31H8M82v6aD8BmvuRjrUb/UAzRnFmdA tF6BP38AfB69U/OYZ+49g96aZ1V43xqFryL3kS3hfLijKbmg+EUbxGn0oyxMxLZzXm1p auCZzPVinphKFGRNK30S7wi+E6aNKdatgVFevIWOqPM7xmamRsS3Q6MJpjDRrMohb5cm nZawgFhtnUC1+BhaferLFdD4e8a35WRHaC+sJ22D+fdM6oCQ4hthghgmGLOPn+b99fTO zOtHFdCB4d0LUfS745cyeLtUABqqZU/1QCFPH46lW9iX7pf2NkBk+IklrJdZxX5Ab4Ok zJTg== 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=iQO9sfNdqBwlZInREZDsg0LeWlaj29IFGs5mv31i9qA=; b=YkRh32RmpZjQRTzLsniuXs2RrB8EG0qe3kcaDfIeKwYgK89ZXQVb94ahyxkfDaeNFQ yq0HSkVwy5qaPyGvAM3SvYtjwKj25ubRof3A7Q8xUPTEPSknoK3LABg8nYXowjkcshID JZOxRiHlM/GOgqzSM7uc6kxFThsfXqkRiT9A540+RHCGJoliPTxaDcZCdk9UG6Q1obvU zlELA18C96X5kOmj/b6OwGaci/XgLP+Ny7qT4BlTI3H2laIqjAB+eWittfNnBsqCsVIr B8kJvXZbE1zUihzpCZ3Ao4doWL6eRzX9jueNodbilEVHOxFIv5XnFB0aRzXb224daaMQ 4w5Q== X-Gm-Message-State: APjAAAU45Uix/FJJsaL8CIYt5GuXYt5Yhx5l3Tel1+DIcrtYHw0o6wh9 O65rig1mL7WMgdrxOAj2ZH/ypw== X-Google-Smtp-Source: APXvYqzc0QOhoK/d3kp/sC1+eUa7GYs//SsNSWuLRkMZkNBmHKut2Q4VB/agrPXtjXSwEmFNw6qGHw== X-Received: by 2002:a05:600c:2293:: with SMTP id 19mr24666wmf.77.1553780521332; Thu, 28 Mar 2019 06:42:01 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id e193sm5956374wmg.18.2019.03.28.06.42.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Mar 2019 06:42:00 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org Date: Thu, 28 Mar 2019 13:41:31 +0000 Message-Id: <20190328134134.22479-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> References: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Cc: sanyog.r.kale@intel.com, Srinivas Kandagatla , pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 1/4] soundwire: add module_sdw_driver helper macro X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP This Helper macro is for Soundwire drivers which do not do anything special in module init/exit. This eliminates a lot of boilerplate. Each module may only use this macro once, and calling it replaces module_init() and module_exit() Signed-off-by: Srinivas Kandagatla --- include/linux/soundwire/sdw_type.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/linux/soundwire/sdw_type.h b/include/linux/soundwire/sdw_type.h index 9fd553e553e9..e14843ed13a5 100644 --- a/include/linux/soundwire/sdw_type.h +++ b/include/linux/soundwire/sdw_type.h @@ -16,4 +16,15 @@ void sdw_unregister_driver(struct sdw_driver *drv); int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size); +/** + * module_sdw_driver() - Helper macro for registering a Soundwire driver + * @__sdw_driver: soundwire slave driver struct + * + * Helper macro for Soundwire drivers which do not do anything special in + * module init/exit. This eliminates a lot of boilerplate. Each module may only + * use this macro once, and calling it replaces module_init() and module_exit() + */ +#define module_sdw_driver(__sdw_driver) \ + module_driver(__sdw_driver, sdw_register_driver, \ + sdw_unregister_driver) #endif /* __SOUNDWIRE_TYPES_H */ From patchwork Thu Mar 28 13:41:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10875027 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 EE8E9922 for ; Thu, 28 Mar 2019 13:44:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2C7E2876D for ; Thu, 28 Mar 2019 13:44:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C4682287C6; Thu, 28 Mar 2019 13:44:40 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2499F2876D for ; Thu, 28 Mar 2019 13:44:40 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5AAF387B; Thu, 28 Mar 2019 14:43:48 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5AAF387B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1553780678; bh=Bc6UrnporWHDJKE1RD2VgWViSHiCuFsKhxK0Wgs607Y=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sDzoI1cTryyzdjSO9p3PbbUygRQea0EeQbWXTP1AzxIoPc/koAZhgCoEHRrOvZNi3 kI12fgYzXSNKLUwU/DinQ/CB63sNQUupZrDgnduc7Y1eRUJQ9IGAd1ikDd3Mfz6oBq AgBnIlXbIn6LtCcpnHFh+9s1Q03mBilEPfliNBJU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AC281F89708; Thu, 28 Mar 2019 14:42:12 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E85F7F8971A; Thu, 28 Mar 2019 14:42:09 +0100 (CET) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2EBD5F8963C for ; Thu, 28 Mar 2019 14:42:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2EBD5F8963C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hDP7BULK" Received: by mail-wr1-x444.google.com with SMTP id j9so22950537wrn.6 for ; Thu, 28 Mar 2019 06:42:03 -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 :mime-version:content-transfer-encoding; bh=QFy2R/hbHdQU/GYBZGpsK8dhJom8kWbgEiSyNSuVg9E=; b=hDP7BULK4cwy8tLjpaX53MoVAzLd4Iwxvkh2ZVnrU7FD1lUZKLxKg+sApf7QrJ9DLS 8LVEhQ27wMUseIJ+TEERj5BKr21jenxNcZ+GrGapWXyymnq8oJLL7ORbrfCqqFtqCDCb 1INRQ8TzkEXl2u2KFoYkBCVC9lT+KdObKwwHmgofqsK2rotKGNVZ1sktJQRnRKCCnkvK o905hoBb0H7xi77B1zOhOCGAgmKqL7wHWSJQ7gCpCkn0vYpQj0SOLsB2tSRh/PRtjfX3 PmelXYlKn8pc0oP3x8kiWacjCW4mSSzn98MzxyngGrFd4kaXRtECRLpxNgzZniid8wUz vIDA== 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=QFy2R/hbHdQU/GYBZGpsK8dhJom8kWbgEiSyNSuVg9E=; b=cVJx35MPuEp70ok171r4Ky6wG9AHcwD66FnGmezCAeHjS7XMyO0z0oqsPpxzP7sPhP aNe/KGZNWFUtERXbEp4TJUXD2A1rebzxh2hKhwp8RonJzj07PYYzoVVd/7Rm0ytMv69c YxtiGc9CsDh6bSzHb4ayl9d9JQxidiRI9AWEbUG1WMXr1x0UBq+v7rB9IyGrrfEcV/uK uxeSjbGPDAKK6hbZXf2BXBzNKSdKNxR430BYTe+Up8Lu850gzl80i7UISGc/HuQF+7TQ QZBa3RXYcAiWM/dvjDAXmwUERGTXm8ZW4G99dky9wGjy+KtsIOu90ZYblLWY5SxiOBhE s2Nw== X-Gm-Message-State: APjAAAVPpkcmS2wNQP8JTXPoiFXFSg5ROy4i1XIGn7MJfEs+xCjofjtF VbdgsrfZWn4Na4gf3rQ7TOJvTw== X-Google-Smtp-Source: APXvYqxh9GjGSCFtLqyod+sobi7ARD7jXoR1a02/6Kwmo+MLWtlNWERvSA3qw1nW3WoxdzTqKyEt3w== X-Received: by 2002:adf:f7c2:: with SMTP id a2mr10097121wrq.242.1553780523153; Thu, 28 Mar 2019 06:42:03 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id e193sm5956374wmg.18.2019.03.28.06.42.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Mar 2019 06:42:01 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org Date: Thu, 28 Mar 2019 13:41:32 +0000 Message-Id: <20190328134134.22479-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> References: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Cc: sanyog.r.kale@intel.com, Srinivas Kandagatla , pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 2/4] soundwire: cdns: fix check for number of messages X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP Looks like there is a typo while checking number of messages, which should be checked in defer pointer rather than message length. Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/cadence_master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index cb6a331f448a..d41adbc57918 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -434,7 +434,7 @@ cdns_xfer_msg_defer(struct sdw_bus *bus, int cmd = 0, ret; /* for defer only 1 message is supported */ - if (msg->len > 1) + if (defer->length > 1) return -ENOTSUPP; ret = cdns_prep_msg(cdns, msg, &cmd); From patchwork Thu Mar 28 13:41:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10875031 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 3608A922 for ; Thu, 28 Mar 2019 13:46:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CCAE28B78 for ; Thu, 28 Mar 2019 13:46:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 100AB28B8B; Thu, 28 Mar 2019 13:46:04 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5E52628B78 for ; Thu, 28 Mar 2019 13:46:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 902ED875; Thu, 28 Mar 2019 14:45:11 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 902ED875 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1553780761; bh=Gk9gpXebte1aUdEd/j+J8FIWwFjQ4aeGPz8lLrfWwLk=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FR2DjOx3YZxGxc4sZh3C0lURmZnpwxLCEk3/54LHleGWYDkLP/PcrLpQsy1ESoBez BY3vvQohlKc9v1U27vbAnsX192hkuGjNEki82Lj30ggLkIfiz05ewqUualhlnfPqC4 ootruUJDPXxxztwpTPPT+UNXe+23V4HH/q21ox44= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DD483F89720; Thu, 28 Mar 2019 14:42:14 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id C4F42F89673; Thu, 28 Mar 2019 14:42:11 +0100 (CET) Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0FC7EF89708 for ; Thu, 28 Mar 2019 14:42:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0FC7EF89708 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="b9QC1xEY" Received: by mail-wr1-x441.google.com with SMTP id r4so15273203wrq.8 for ; Thu, 28 Mar 2019 06:42:05 -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 :mime-version:content-transfer-encoding; bh=qmgZw2FIQ5XbbByZFztSXm12h7POpv6imcOhVfmNnxw=; b=b9QC1xEYXuoz7/MXJEushMDYuWZpkxppL+UVS9dR0t51gMvSfFHsS4h01jN2rJbdkh bFIL4pRqTpIVDUsdT1ntHHcOIzWd1npa7KJ0D+5Fgm4Kcy6Kde85mN8bJaKlL/INFd1q SuDkUf63if30r5pECMBt7ESQIMhqBVA5dNb7lnn8UMpcRtryg7ayjAZZ0PLTFaPX6RF3 eZ2kbZb/oi3C2EfH4iGnKVWejuWhD6zwKw06axJlhbiLszm9iQ4tZgVjgMx3flSC2ErZ WTr24yeyuLob9T3MSTqpvqVzwGq9Ku9XwbC5VhrkaLIZloRDvn/QYb/hlOw21ZCQC4y6 6riQ== 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=qmgZw2FIQ5XbbByZFztSXm12h7POpv6imcOhVfmNnxw=; b=pcGfYUAaQWKAG+DlR3P1Is4fyD2Cx1aVJ9zUF94xYbWwU4d6I3l4/CiPediczFsorW YfpgjRx1MW6c5iXZgz0kKT1lvPaPVkSPOxKHzls+ptqv8mwJBvkTEo6tRDUo/htk0xvm NMNHvUL7SZEUMYUVuyXCUhz3fE1CHueXC+3j0dqs5nA3ThXcXxFtkMvR4zNfUEkI2vNf NvW0ylP8EXupvixSNl02WFAj/fBBFFYoGL9cImH206q/2VKb1URwpBuWSwp4JtPL54lT UaJe2OoGCbs0pVOcBJDlkB2xbU3xdOcFZZ+VDq+fbVrF5Og081SFjq44U/ZV8cpxClCe 9n8g== X-Gm-Message-State: APjAAAUr64Y4O0XL3ItZSNlqMaQgfJeCJ6hNt203KBMmeTeV8IEG4wkR iDpRS6Y4oZ5WxOCHAPT9gtc4Sw== X-Google-Smtp-Source: APXvYqxbxYWj1d7IRKDCfMYoo7IB6HgeliTBonPWYyrWSM0XVcribMjpaqnm6b8Q+16WtPH9pvt1aw== X-Received: by 2002:adf:f88c:: with SMTP id u12mr26320629wrp.235.1553780524954; Thu, 28 Mar 2019 06:42:04 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id e193sm5956374wmg.18.2019.03.28.06.42.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Mar 2019 06:42:03 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org Date: Thu, 28 Mar 2019 13:41:33 +0000 Message-Id: <20190328134134.22479-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> References: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Cc: sanyog.r.kale@intel.com, Srinivas Kandagatla , pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 3/4] soundwire: bus: check if pm runtime is enabled before calling X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP Check the device has pm runtime enabled before returning error. Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/bus.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 1cbfedfc20ef..101562a6fb0d 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -327,9 +327,11 @@ int sdw_nread(struct sdw_slave *slave, u32 addr, size_t count, u8 *val) if (ret < 0) return ret; - ret = pm_runtime_get_sync(slave->bus->dev); - if (ret < 0) - return ret; + if (pm_runtime_enabled(slave->bus->dev)) { + ret = pm_runtime_get_sync(slave->bus->dev); + if (ret < 0) + return ret; + } ret = sdw_transfer(slave->bus, &msg); pm_runtime_put(slave->bus->dev); @@ -355,9 +357,11 @@ int sdw_nwrite(struct sdw_slave *slave, u32 addr, size_t count, u8 *val) if (ret < 0) return ret; - ret = pm_runtime_get_sync(slave->bus->dev); - if (ret < 0) - return ret; + if (pm_runtime_enabled(slave->bus->dev)) { + ret = pm_runtime_get_sync(slave->bus->dev); + if (ret < 0) + return ret; + } ret = sdw_transfer(slave->bus, &msg); pm_runtime_put(slave->bus->dev); From patchwork Thu Mar 28 13:41:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10875029 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 4A69C14DE for ; Thu, 28 Mar 2019 13:45:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31DE128B78 for ; Thu, 28 Mar 2019 13:45:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25EF028B8B; Thu, 28 Mar 2019 13:45:26 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BFA6628B78 for ; Thu, 28 Mar 2019 13:45:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F3BAA892; Thu, 28 Mar 2019 14:44:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F3BAA892 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1553780723; bh=O1g0FtMmHAkVDrHkfIrZzDjwWwK1wDN7J4Nl50YrJM8=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=tWKmfbJA81yXsT0vNrWeUQ7MBkkFQvdNKUjtLmmniL/mJRz6SE5qjs1ZBJA/Q5Yti JnnixOceRGFDoL/Wu/3sALJjQi75Vk1kCyGlAq7T9yO75WeBEHKTTaxME68UceCYRX ZuooIfgQYkwA7/ZHXa8ZEl0ssuJKDbftJyyz0zR8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D6326F8971B; Thu, 28 Mar 2019 14:42:13 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 465C4F89673; Thu, 28 Mar 2019 14:42:11 +0100 (CET) Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5BE31F89714 for ; Thu, 28 Mar 2019 14:42:06 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5BE31F89714 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="whHLW2k5" Received: by mail-wr1-x442.google.com with SMTP id w1so23004642wrp.2 for ; Thu, 28 Mar 2019 06:42:06 -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 :mime-version:content-transfer-encoding; bh=BcGaTaMQmuywC4bSZxjGJr30B962Vf+iU+ir6+/qFlU=; b=whHLW2k5vJ5z/Y3pC60xWQ5hd/tKTraymN/lKgR2ZNGNM8s1z0axdnq+J2tvsM+AX7 7dKMEmYYGzt939rfWTLfwaMyxTFAMXuZuiUdcqXy6utk+2IjimpivX2UIC4R5Cbo+We2 8/M0qmd5jMOrpxH9gmFDd2Lo+TctTnqpi8TRiHVyPweUSwD2h5G04h1c/q5DljVuinbF vjCVk06RKqxB4WdJJXv5BrGnT0vJrdx1iP5xFg+vgCPPR6osfSRzoGITW9Lj/HYw7oh0 Bt9jDlnSu+tLhDt4DxOrnVa/q/gu0lAlbYAAav2D5RoT3Z20D3KreRTcL9AqGkysbjC3 T0mg== 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=BcGaTaMQmuywC4bSZxjGJr30B962Vf+iU+ir6+/qFlU=; b=K86kJ23NFwSRYWT/qqDd6WIN5vMSDpaEIeMkyJA8SPeUl3COoI9300eN/vrHjmjAU8 Ul/7Jcj9M5e8svrytwsEAVQOj+nHPZa4K+Kd+0NSmHSFnHvXvfObceSjQMF3u5LOBfuE bDAnuuEnTi7MUjKCWJ8I7Ik/sdInBGXN52GR6xoe7p4swi99BQnPX8arcAahRDTDs0cQ f+ULsy5BRz1PFHiT1h9qYt3299gZiFMVta2IeK60B0QQ7EWa3S42heZehmfsb8xlb6t6 krwSjzTf2s/LiZXDBOBKEeZ5b0VktVDi4YreymV5KCw5wrVi2zJNNysaWJMXhxbvXNEA vnqg== X-Gm-Message-State: APjAAAXAsRobplre1OCzk4QunOYdTGOMt5v6HljrYBG/LySmPCKQ9w0B GDWhR/j69bKNn0jYCp+vgSTXTQ== X-Google-Smtp-Source: APXvYqx+xlS19ZYXNIS8RW7OuAXs3UIEA41o6vMC44xLQ+TzU3/kAnTUxlyYCzmnLO8wP8IXsc1A0A== X-Received: by 2002:a5d:4d49:: with SMTP id a9mr14637311wru.227.1553780526253; Thu, 28 Mar 2019 06:42:06 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id e193sm5956374wmg.18.2019.03.28.06.42.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Mar 2019 06:42:05 -0700 (PDT) From: Srinivas Kandagatla To: vkoul@kernel.org Date: Thu, 28 Mar 2019 13:41:34 +0000 Message-Id: <20190328134134.22479-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> References: <20190328134134.22479-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Cc: sanyog.r.kale@intel.com, Srinivas Kandagatla , pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 4/4] soundwire: remove unused struct sdw_bus_conf definition X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP struct sdw_bus_conf seems to be replaced with struct sdw_bus_params so remove this unused data structure to avoid confusion to readers. Signed-off-by: Srinivas Kandagatla --- include/linux/soundwire/sdw.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index df313913e856..a8129745b7ec 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -389,21 +389,6 @@ enum sdw_reg_bank { SDW_BANK1, }; -/** - * struct sdw_bus_conf: Bus configuration - * - * @clk_freq: Clock frequency, in Hz - * @num_rows: Number of rows in frame - * @num_cols: Number of columns in frame - * @bank: Next register bank - */ -struct sdw_bus_conf { - unsigned int clk_freq; - unsigned int num_rows; - unsigned int num_cols; - unsigned int bank; -}; - /** * struct sdw_prepare_ch: Prepare/De-prepare Data Port channel *