Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp978009rwb; Thu, 18 Aug 2022 16:13:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR7jSpJJVnfhwsALTdPbzMOnmPEq0uKMNHzuwFAlBfHjY9TGAHEOIGCSaW5lBdeUtYSmOmg+ X-Received: by 2002:a17:90a:8001:b0:1f4:fe95:c420 with SMTP id b1-20020a17090a800100b001f4fe95c420mr5469238pjn.146.1660864404824; Thu, 18 Aug 2022 16:13:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660864404; cv=none; d=google.com; s=arc-20160816; b=b97cvTVcseMSg03LhnLfWW8bqmgaIpGlyz5oCZ9fUPR8ujbhSCZsGqjmEREVJidf5X Xl5xl9PBcSpUzOqNkcOggqS9sMMxMHz9usq5zglKEyTWO/SL9Wk1J6ltaPuiK69pve+b Rill8cgkQQrtvvgbS1C2XFNjszJTEtLDGU5y9ZCJPnph8Cj6TUEE3EWXVBytV8ZX9ozy Q0Ukn29LY6TrL+OcniHf8GTEaPDlX1Ss8eFMUraUjEtw5mAl7F+6QZhR6AGvtjtr8lpf b6TK+2Ye3WxjVlFC3WXvPRqeObJXSVWl+8gYLBsEmougRJ0JXcc6PXrTcc5o3wYMpI0X nQGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=JxopBh8HkyBkhRSXNYJZ9c/ibzZWN5l/rUoK8TuOX2E=; b=dMed4Q3XscboehAm33ohqFpSbyj1ISfhRtHqpBP6PLxLqE3r8JOCuirjdWirQ9AHuz Bqa4M5XaMu6FYThkCOPBrSrP/NOUe/ZmaVhaOwNc5hJ4z3nkKR9VYimSrlx81OHrQgD+ KVmFIBc/3zzJ/kA7wud+y9TA0U0iISD28r3uV6RGzINvazEyOUe2udG2hDywKpW2wnCN 7uWhdcyJ73by2LiWj1GUFn0ZHCdNS+n1xD+Kv1zG/RG3jVocy0oNR5L+m1AhMeiP3pz9 XncEn5JbOdl1lTvxje6emKYlPC+detam5I85ByC2PBdKFWYqxBmEN/57qCXrYaJdNlv2 xX4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iC+fZT3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x8-20020a63f708000000b0041a643fb062si2405449pgh.451.2022.08.18.16.13.13; Thu, 18 Aug 2022 16:13:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iC+fZT3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344183AbiHRXMA (ORCPT + 99 others); Thu, 18 Aug 2022 19:12:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241453AbiHRXL6 (ORCPT ); Thu, 18 Aug 2022 19:11:58 -0400 Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2D59D075E for ; Thu, 18 Aug 2022 16:11:57 -0700 (PDT) Received: by mail-qv1-xf36.google.com with SMTP id p5so734528qvz.6 for ; Thu, 18 Aug 2022 16:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=JxopBh8HkyBkhRSXNYJZ9c/ibzZWN5l/rUoK8TuOX2E=; b=iC+fZT3dlJvUKuKtlV48BgZMVi5cgLckf98h3Odsln7D0P1vjmxRyrmDeTJuYXy8IH EQApL5yeY0dyQ2tsCWKu/NzConaTwfRZk1kM2sH8PfORdch+wfEAOM52CN0HS59+BT8N 06YZ6tQcs3XhGRJCpDxzjlQohUrimOBJa+PTFyoSeKj6H8q8M+fquSoZzz8GYwfELBAb DzrHffMKlr8M7i+XxKFObuJxSvTpg+MMj87vIHIVobjd1m54YOCsq/ADZwu0SAzuauD7 PSsmaq/EGBdwZqv3jcNT22E6xojVI14ljhVNOA0BcW0CjyXrDATAUA0twA1Q2JOeGeIJ kdOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=JxopBh8HkyBkhRSXNYJZ9c/ibzZWN5l/rUoK8TuOX2E=; b=d8FWmxJxzD+SN+kAvlLCWJBCIN4KnSs5GSYI3Ti1MPLKVMBTuhx/hocmKCQKfe3fsD UeZJf6EljjyCm/fKb1Qe/DkqCSKG7A5vqgwWrxqMRX1wEHE2Jx3AO/vX/DV4+DynHH7H WAvnb74fZKrTJdI184FX+4eY1BXutopIsylBBtlktM9b/7P67LqjdlCxpV4oFf+0qsez +PYS5gekJgC1uAAymTcmnJiiuup8Y0+ZHp2iS+HaFDvlgeAeb3YwNuJYfB4q6tzbSGFs Vbth6o1ZLP9lFu7Ulvpjs6m2Sn4wytnVHj7UlK+8s3JExtLd5H2enTProLUj1wKvn0Jx ayGQ== X-Gm-Message-State: ACgBeo29KMWvX7qf8oFUUlEhNMw3vQWVPqQf65NW/gUTzUrrbW3gMudd lWjQcKcDyuqVRnf6QPwVH3bg8A== X-Received: by 2002:a0c:e482:0:b0:496:c63a:a3a3 with SMTP id n2-20020a0ce482000000b00496c63aa3a3mr113741qvl.28.1660864316805; Thu, 18 Aug 2022 16:11:56 -0700 (PDT) Received: from fedora.attlocal.net (69-109-179-158.lightspeed.dybhfl.sbcglobal.net. [69.109.179.158]) by smtp.gmail.com with ESMTPSA id h16-20020a05620a245000b006b5f06186aesm2864801qkn.65.2022.08.18.16.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Aug 2022 16:11:56 -0700 (PDT) From: William Breathitt Gray To: linux-iio@vger.kernel.or, linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linus.walleij@linaro.org, brgl@bgdev.pl, William Breathitt Gray Subject: [PATCH 0/6] isa: Ensure number of irq matches number of base Date: Thu, 18 Aug 2022 12:28:09 -0400 Message-Id: X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DATE_IN_PAST_06_12, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Several ISA drivers support IRQ and call devm_request_irq() in their device probe callbacks. These drivers typically provide an "irq" array module parameter, which matches with the respective "base" array module parameter, to specify what IRQ lines are used for each device. To reduce code repetition, a module_isa_driver_with_irq helper macro is introduced providing a check ensuring that the number of "irq" passed to the module matches with the respective number of "base". The relevant ISA drivers are updated accordingly to utilize the new module_isa_driver_with_irq macro. William Breathitt Gray (6): isa: Introduce the module_isa_driver_with_irq helper macro counter: 104-quad-8: Ensure number of irq matches number of base gpio: 104-dio-48e: Ensure number of irq matches number of base gpio: 104-idi-48: Ensure number of irq matches number of base gpio: 104-idio-16: Ensure number of irq matches number of base gpio: ws16c48: Ensure number of irq matches number of base drivers/counter/104-quad-8.c | 5 ++-- drivers/gpio/gpio-104-dio-48e.c | 5 ++-- drivers/gpio/gpio-104-idi-48.c | 5 ++-- drivers/gpio/gpio-104-idio-16.c | 5 ++-- drivers/gpio/gpio-ws16c48.c | 5 ++-- include/linux/isa.h | 52 ++++++++++++++++++++++++++------- 6 files changed, 57 insertions(+), 20 deletions(-) base-commit: 568035b01cfb107af8d2e4bd2fb9aea22cf5b868 -- 2.37.2