From patchwork Thu May 21 03:49:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 6452041 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 75AC89F318 for ; Thu, 21 May 2015 03:49:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A645203B7 for ; Thu, 21 May 2015 03:49:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F14D20429 for ; Thu, 21 May 2015 03:49:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753538AbbEUDtT (ORCPT ); Wed, 20 May 2015 23:49:19 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:63960 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751576AbbEUDtS (ORCPT ); Wed, 20 May 2015 23:49:18 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 21 May 2015 12:49:17 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 1D4654D36E; Thu, 21 May 2015 12:49:17 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 045192806E; Thu, 21 May 2015 12:49:16 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id F2A382806D; Thu, 21 May 2015 12:49:16 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id NAE10935; Thu, 21 May 2015 12:49:16 +0900 X-IronPort-AV: E=Sophos;i="5.13,466,1427727600"; d="scan'208";a="186648297" Received: from mail-hk1lp0122.outbound.protection.outlook.com (HELO APAC01-HK1-obe.outbound.protection.outlook.com) ([207.46.51.122]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 21 May 2015 12:49:15 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.132) by SIXPR06MB317.apcprd06.prod.outlook.com (10.141.125.143) with Microsoft SMTP Server (TLS) id 15.1.166.22; Thu, 21 May 2015 03:49:13 +0000 Message-ID: <87617mtwvo.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/4 v2] ASoC: rsnd: indicate unknown HW start User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") To: Vinod Koul , Mark Brown CC: Simon , Nguyen Viet Dung , Magnus , Linux-SH , Linux-ALSA , Liam Girdwood , Laurent , Geert Uytterhoeven , Cao Minh Hiep , sakato , In-Reply-To: <878ucitwyh.wl%kuninori.morimoto.gx@renesas.com> References: <878ucitwyh.wl%kuninori.morimoto.gx@renesas.com> Date: Thu, 21 May 2015 03:49:13 +0000 X-Originating-IP: [211.11.155.132] X-ClientProxiedBy: OS1PR01CA0003.jpnprd01.prod.outlook.com (25.161.225.141) To SIXPR06MB317.apcprd06.prod.outlook.com (10.141.125.143) X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SIXPR06MB317; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5005006)(3002001); SRVR:SIXPR06MB317; BCL:0; PCL:0; RULEID:; SRVR:SIXPR06MB317; X-Forefront-PRVS: 0583A86C08 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(66066001)(33646002)(83506001)(42186005)(101416001)(53416004)(64706001)(69596002)(47776003)(36756003)(105586002)(19580405001)(19580395003)(2950100001)(189998001)(46102003)(46406003)(106356001)(5001770100001)(5001830100001)(5001860100001)(50986999)(54356999)(76176999)(77096005)(68736005)(5001960100002)(50466002)(229853001)(86362001)(77156002)(23726002)(62966003)(4001350100001)(92566002)(40100003)(4001540100001)(81156007)(122386002)(87976001)(97736004); DIR:OUT; SFP:1102; SCL:1; SRVR:SIXPR06MB317; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 May 2015 03:49:13.3866 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SIXPR06MB317 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto rsnd_ssi_hw_stop() should be called after rsnd_ssi_hw_start(). This patch indicates unknown hw_stop as error Signed-off-by: Kuninori Morimoto Tested-by: Keita Kobayashi Tested by: Cao Minh Hiep --- v1 -> v2 - add Hiep's Test-by sound/soc/sh/rcar/ssi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index 5b89723..927ac52 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c @@ -232,8 +232,10 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi) struct device *dev = rsnd_priv_to_dev(priv); u32 cr; - if (0 == ssi->usrcnt) /* stop might be called without start */ + if (0 == ssi->usrcnt) { + dev_err(dev, "%s called without starting\n", __func__); return; + } ssi->usrcnt--;