From patchwork Tue Sep 3 14:22:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 172805 Delivered-To: patches@linaro.org Received: by 2002:ac9:5c4b:0:0:0:0:0 with SMTP id r11csp5641464ocp; Tue, 3 Sep 2019 07:22:42 -0700 (PDT) X-Received: by 2002:ac2:5a4c:: with SMTP id r12mr5198356lfn.52.1567520561912; Tue, 03 Sep 2019 07:22:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567520561; cv=none; d=google.com; s=arc-20160816; b=UVe4IJ/jYBrYFGCyeUXxflKKx+siYeCk8bNA06MZOOI4ryDwLqxa2fWHFdNC4IUltI P7DSl0bTwPIV2tvVLh/LW24TgQrdnjD6IBE9mGnaXC56WJTpoMpIxdPf678KCaIAOzLA bmj6r/3o3zfY+LXGEKFKalUaDkCA8y+PNjNMV07NJSVL46eJSREcotIWFHpNcvGefmzU U1A88/PbSD4uO0GctxZCXalzfVCCmH0ozYrag5dKp7Uaa5Slqir1tC4Dsih2ehqtMNh1 9xwUaUVemnL/HwKwNG6b5UJU83QCX9RjBx9ri3G3SwROzxdChN+rRRQAiMZFfNXDY+5b Agig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bEFp+hq6WF76ZDQD++03UfUz54PPaJzLtrNfLK0kmKc=; b=ePSkBe6Yog8oGyCj/jIY3nHbSTSGfgKnGIgc8Qq/49yjrRXNEa8NJnBSxRmZIkhCD8 5tvtK+DGy6bT7SOezdnSKY0VEjtrRPiauXrliRYb2lllcVeuvRAkV7ZMsu8Ri4wJgJAR 07JMl2qAaxifHmjuf2/iUa+c0qXAtwurqxNzA4wIpBUC3J+1hzLH5xzF5HcaIvB8ccf/ CNk1im7koBBD3huOOLvq8bM6XdBbJ1vEMs4ud3I3HVqRgd7hH8l3Q2ZTxrZVXzJhTq+d bncWRGGcQhGwaRZ2o53AV7ciEQ6R1D4+2aYb3tbt1MAloXDBGug0ZnMUFyxBEFi1AwIs L1Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rAhNS1CG; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id q18sor1123826ljg.15.2019.09.03.07.22.41 for (Google Transport Security); Tue, 03 Sep 2019 07:22:41 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rAhNS1CG; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=bEFp+hq6WF76ZDQD++03UfUz54PPaJzLtrNfLK0kmKc=; b=rAhNS1CG/SmhFG+9WpuAZAeuPWOmk3PRWJElNLoXN9FlAYJrC5d2tMGtSLKAzzr6aX M6RoloYPdbqO7f5KwLApFXL+4m6Bk52g/kRO26+PDT6sL6QjdkhUhNAlS/6BUor2GIw9 L9o7YJEmuiMYtKfrqR+2Ryk2eKnBqa02t4dRxFRR1EMsKXIt8npFYRpTLyGUypZVdH9z AbwkoOLM+mUoCkGcJjfZFqVq4Ll6oXSS/5PGsQexGh5kQ2u8yJScqJKun/W57FppaC2V Fyd+KYGI6mXusxA9Gfyyo7L8okOZ+fwTC9VNxuYyKTKc841K7x6ArZGR+e/EomnDuygF tY5A== 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=bEFp+hq6WF76ZDQD++03UfUz54PPaJzLtrNfLK0kmKc=; b=MQjqOCQBqxwgIbZqvjcU06JwDw2QI1ovMGXu7OM9PophxsEdE6MX90AuvsaFGupWO3 6YLZHsvtVo0mfYV3MDC5Y4F/tvLjvvREynB7u4+9ffTaZRkLtywJCUn6/VT6DOKnx8An jay9CJQKSRshz5QVYGNU7znorhSkoPiB20y1AfOFF81hI+AsC9eU34dopjVQ73TKrD3n qFtL8f8q7xdH/aamgTEIVsB8rk9O+dPrJdFQcYRJ3/djR2W9GHNayvNYKBauqr8b2sih S9qE3Z3I84ZfndroyjDAn0EU/6goACJp9cXHWMjFCc+Vzogv2m77Sx3k1OoLHqlb89cA Dqew== X-Gm-Message-State: APjAAAUy9O+wiVvBO8QGxSbWEiap5aB8fTgnxbAzhl6Hoc1Wo3rsSUHh NLnmrDboeHO4qCIQN5eoIX0lZzdZ X-Google-Smtp-Source: APXvYqwW7bKtefLZcTuxAgXstvnr8V4cg5OryM4fdGNKnmzlZIkWikBetS9faCFtCgLjjSTO6ycVQw== X-Received: by 2002:a2e:2c16:: with SMTP id s22mr8923823ljs.148.1567520561447; Tue, 03 Sep 2019 07:22:41 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id v10sm2430862ljc.64.2019.09.03.07.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 07:22:40 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson , Matthias Kaehlcke Cc: Shawn Lin , Jaehoon Chung , Yong Mao , Chaotian Jing , linux-kernel@vger.kernel.org Subject: [PATCH 06/11] mmc: core: Clarify that the ->ack_sdio_irq() callback is mandatory Date: Tue, 3 Sep 2019 16:22:02 +0200 Message-Id: <20190903142207.5825-7-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190903142207.5825-1-ulf.hansson@linaro.org> References: <20190903142207.5825-1-ulf.hansson@linaro.org> For the MMC_CAP2_SDIO_IRQ_NOTHREAD case and when using sdio_signal_irq(), the ->ack_sdio_irq() is already mandatory, which was not the case for those host drivers that called sdio_run_irqs() directly. As there are no longer any drivers calling sdio_run_irqs(), let's clarify the code by dropping the unnecessary check and explicitly state that the callback is mandatory in the header file. Signed-off-by: Ulf Hansson --- drivers/mmc/core/sdio_irq.c | 3 +-- include/linux/mmc/host.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 Reviewed-by: Matthias Kaehlcke diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index 0962a4357d54..d7965b53a6d2 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -115,8 +115,7 @@ static void sdio_run_irqs(struct mmc_host *host) mmc_claim_host(host); if (host->sdio_irqs) { process_sdio_pending_irqs(host); - if (host->ops->ack_sdio_irq) - host->ops->ack_sdio_irq(host); + host->ops->ack_sdio_irq(host); } mmc_release_host(host); } diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 0c0a565c7ff1..ecdc1b0b1313 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -128,6 +128,7 @@ struct mmc_host_ops { int (*get_cd)(struct mmc_host *host); void (*enable_sdio_irq)(struct mmc_host *host, int enable); + /* Mandatory callback when using MMC_CAP2_SDIO_IRQ_NOTHREAD. */ void (*ack_sdio_irq)(struct mmc_host *host); /* optional callback for HC quirks */