From patchwork Wed Nov 25 11:28:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 7698111 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 78801BF90C for ; Wed, 25 Nov 2015 11:29:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 044CB208BC for ; Wed, 25 Nov 2015 11:29:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2DF1020859 for ; Wed, 25 Nov 2015 11:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752569AbbKYL3V (ORCPT ); Wed, 25 Nov 2015 06:29:21 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:33205 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752553AbbKYL3U (ORCPT ); Wed, 25 Nov 2015 06:29:20 -0500 Received: by wmec201 with SMTP id c201so251659949wme.0 for ; Wed, 25 Nov 2015 03:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=lNNeZpZ19vQQJTAVD738qhI+eafaGOysWMRhtwwl86M=; b=ZPzgbDG3igi/FOZoCBbzsaXWCdzhBOplg/hfTlVxJtBmUXNoc5LOJXlquWmHjei91l BhwJFIcf9VjZB521F17NWiBJvoFIMK50VyA7+sfLQEkb5qp3J4S1NzfhaWDN0b/0BApz IyuNLHmzEkHyCv3TxYUkZOwf7kF+qpuqSyWVXu5pBhZhLDaYGkiL1GQ0JiA538JS56Va aOT1dAPfl2c01MQN1LFG/MNjq2Rd1B1IE7hZMRvsxqefpwEuQP25VbPqmrUq6t18Kubk ZAedgLpoOSgq9JQIcGxWdYqtNDGAKJVGU8043SuMhBA6I6c9vXj9IGg8Ou8pWJTW8EI7 YRMA== X-Received: by 10.28.33.136 with SMTP id h130mr4211485wmh.93.1448450959808; Wed, 25 Nov 2015 03:29:19 -0800 (PST) Received: from localhost.localdomain ([212.91.95.170]) by smtp.gmail.com with ESMTPSA id d66sm3047237wma.21.2015.11.25.03.29.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Nov 2015 03:29:18 -0800 (PST) From: Carlo Caione To: ulf.hansson@linaro.org, hdegoede@redhat.com, linux-mmc@vger.kernel.org, drake@endlessm.com Cc: Carlo Caione Subject: [PATCH 2/3] mmc: Add a new mmc_is_io_op helper function Date: Wed, 25 Nov 2015 12:28:46 +0100 Message-Id: <1448450927-13682-3-git-send-email-carlo@caione.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1448450927-13682-1-git-send-email-carlo@caione.org> References: <1448450927-13682-1-git-send-email-carlo@caione.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,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: Carlo Caione Add a helper function to check if an opcode is a sd-io-* opcode. Signed-off-by: Carlo Caione --- drivers/mmc/core/sdio_ops.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/core/sdio_ops.h b/drivers/mmc/core/sdio_ops.h index e4b5ceb..9b614b2 100644 --- a/drivers/mmc/core/sdio_ops.h +++ b/drivers/mmc/core/sdio_ops.h @@ -26,5 +26,10 @@ static inline bool mmc_is_rw_io_op(u32 opcode) return opcode == SD_IO_RW_DIRECT || opcode == SD_IO_RW_EXTENDED; } +static inline bool mmc_is_io_op(u32 opcode) +{ + return mmc_is_rw_io_op(opcode) || opcode == SD_IO_SEND_OP_COND; +} + #endif