From patchwork Sun Feb 25 20:16:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 206112 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp1729704dyb; Sun, 25 Feb 2024 12:17:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUpOBb5cfghWooY7GpYA23N/cLrlfcMGLacosDYt/pX1m7acuB0t0VJTdWfDH8xXcc9oKrUCOEo7TYxmEpS4mboinKDEQ== X-Google-Smtp-Source: AGHT+IGWdC/EghDNOkZjL0tQ9vj3MA3CaunFEER5mSqw3xQ7+kKAJY5nPvDoZvuTeCSzRnUlKCHT X-Received: by 2002:a17:906:69c8:b0:a41:5675:4e2e with SMTP id g8-20020a17090669c800b00a4156754e2emr4702446ejs.19.1708892246886; Sun, 25 Feb 2024 12:17:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708892246; cv=pass; d=google.com; s=arc-20160816; b=lV10MJFSUDvig5IxoQfg8YO6tmvSwzHS/NCi0f26VHyv258uXncWCrHlV/VZZSOK3G AqpkFq9tRjnv29Czb3yDCMUU9EYBSxU2qKFSEqA53q19syrr+cL426B2flpmCKwMBQT6 B3AEovMkE0CPTX4VKTG9mPOlNfMwY7ixsMLraYfEXtvG6+0b0mtDDMWlyslkjCqKZXZ2 6G4CHS43IULdu0z87Q8KRtq9Qi7ZZYPEJcDgDC+EJ/zNS08j+l3qBb5zjvX8lkYMxH3M Mq43olaMS9xo7qy9fj0xHV+x9CkLsir0Hqoc1KODDvEtgzjTKLXCfomUsJMaRuWIZ+Ap 46ww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6RDTCOuw+4/YmutiadjBWbj6E1uINYYJEFoH23miprM=; fh=Zql+qn7Yg7n3QPt3pHE2aBp4hVVbEZbyHNRPYjrvXjo=; b=OKOuMZ87iRoVmkCsBfX2DnA5R4F1uw4/4SH9qUkXnYMIsaZFKAMQai5WgdC2nFQ5nO 5+wGCms73TXfXaOICcHGMPQ4gp5X4fNvSM2kDsrKwmfL9PeBIOWdAwOiAD2m40DYE6TU ezbynfl5KWbtMf+IHURRQ7wKb5R3rc9Ow35xIRcUUXTlzlGuDWciugzL2vhTMZtVETcB ViKZu0FHWZ31uSarbWcYN4a3NxQH/I5RBLvFYFU9k/NcRwGl8gvSDDu/+VkIYzWdnuvi EhzG0WDDekmNhVFavuQfWMrhHWeB4ilaGz/hPLnZE0If4VMp1cKISLjGPYf6eOMCN8SG UCfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jTSc2LUl; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-80273-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80273-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id me17-20020a170906aed100b00a435b6d553esi75361ejb.283.2024.02.25.12.17.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 12:17:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80273-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jTSc2LUl; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-80273-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80273-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5E4691F224F6 for ; Sun, 25 Feb 2024 20:17:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 64A661BC4D; Sun, 25 Feb 2024 20:17:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="jTSc2LUl" Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CE971B94E for ; Sun, 25 Feb 2024 20:16:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708892221; cv=none; b=BVLsjC2bZFFScqI2DMihrez9uNMyo+5iKuWuj2caBPKVtre7iLxKNru+9yXVTnHs2Gx7q/P4Tx3CCs4LPQ1O3pgt6vgaYDZVQIK+i4h7CEA86gBNsiAgtn2y5G1g8cqVr7YCmn56SFAhPG7WF9bExSL7sgGAYCRgSuvbVCIVkWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708892221; c=relaxed/simple; bh=hYVGG3zCAp5q9wfPxfygwzoMeHDq1lD0TOw/nA3SQqQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Nf+t7ch3aXJ3tTSpIu1lulPVBNlImvGzfwTPLuJmY3RBrcjylqCpGc2znCG720pI17tdEmaRCXVAJ4wFUKkRVJIkp9toFNAd2GaPzDp7/hN+8hWe+OyXbQgYLQDeSulkpiruViitOQiFSis7J9MGyqpiLsiIw5xHW/7b7cUzq6Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=jTSc2LUl; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a3e75e30d36so473536866b.1 for ; Sun, 25 Feb 2024 12:16:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708892218; x=1709497018; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6RDTCOuw+4/YmutiadjBWbj6E1uINYYJEFoH23miprM=; b=jTSc2LUlfL9HNZQxdkHaTC4xuPsQJARzz3Z4OQYdm6h9WFT+s78aJ9mxdKQykCf/mm a003kjvKslqH6b+R0LviKWzJzmmvx5Kgc+UwzeFfkxLyS/wlTt/Drk0pf+pslbLlMo/0 lFM75bX//fGjirj6usSAZM3DWQhHl2FDxs1v0VjdHKjMM3yhR8s61MIQ4IfEEuspG+kn tuZsstHtpvfeCYJ81KjrSWQbEo+iLLwPkBM8SY4RGISq7G45PB4aJ0dFxzzQjpcyf8Lc lENV1ZEe2CAfaqHqr78qUuJCDD788KCzdWqNcZroxggMT7SXZ/A0x1roGY33Nu5Aa97n PDlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708892218; x=1709497018; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6RDTCOuw+4/YmutiadjBWbj6E1uINYYJEFoH23miprM=; b=l2IMvOrJrjLMr2tVjbTU8vtQLMxSrxpYBjnhEZz/HlstKrpwh+GF2+kV1O8k8qiHJz 8ayVNYjU3ze8njZMqyBgJNh/X+PVGdxeAExlgqCjfSe4eDSaOetKtuYC+ijB1RSc56oJ vxfoicCJ4ueDvqdp9gjzEJyaqpPnGeCfHvB+Chs869TSgokEL9yE8mgR6QZ58sswfzYl 2Kj/tz5SCV90iFA9tctrgCma0CwjD0AN/ffnFfej85iekPT2W6Czu2+q0TcaKzxkuFPY p6Kts5piDifGtS371MA6rgekdrTTxGUX8Tzro8Y5rYma5Q5B9OWdmZshUq+X6Vw2ahQG iwjg== X-Forwarded-Encrypted: i=1; AJvYcCXpeo5iTAMJFlXiZ6SiWAgj2Vk7B2QErJst32BnGOuj9AkDZ04OPlPfcWj7fEuRUs+WqE4seIy6H2d3/Di7cXR1mn1pH7fIIae2Blcw X-Gm-Message-State: AOJu0Ywrl1/HE8DODA2oxlBjD1U2MsfgQZ9UhOpuc8Xo/k3tDJadZoBH fg/YlBMtCMXUedsd3ShYMB8FsVdRed3XsHYSv16qnyZ6tsQ/+8qstMCc2q90oH4= X-Received: by 2002:a17:906:b798:b0:a41:3d8b:80d with SMTP id dt24-20020a170906b79800b00a413d8b080dmr3872738ejb.37.1708892218531; Sun, 25 Feb 2024 12:16:58 -0800 (PST) Received: from krzk-bin.. ([178.197.222.116]) by smtp.gmail.com with ESMTPSA id ck13-20020a170906c44d00b00a3d7bcfb9a1sm1741045ejb.128.2024.02.25.12.16.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 12:16:58 -0800 (PST) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: Krzysztof Kozlowski Subject: [PATCH v2 2/2] iio: proximity: isl29501: make use of of_device_id table Date: Sun, 25 Feb 2024 21:16:54 +0100 Message-Id: <20240225201654.49450-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240225201654.49450-1-krzysztof.kozlowski@linaro.org> References: <20240225201654.49450-1-krzysztof.kozlowski@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791903396331719088 X-GMAIL-MSGID: 1791903396331719088 Reference the of_device_id table in the driver structure, so it will be used for module autoloading and device matching. This fixes clang W=1 warning: isl29501.c:999:34: error: unused variable 'isl29501_i2c_matches' [-Werror,-Wunused-const-variable] Signed-off-by: Krzysztof Kozlowski --- Rework according to comments. An old v1: https://lore.kernel.org/all/20230810111933.205619-1-krzysztof.kozlowski@linaro.org/ --- drivers/iio/proximity/isl29501.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iio/proximity/isl29501.c b/drivers/iio/proximity/isl29501.c index bcebacaf3dab..4982686fb4c3 100644 --- a/drivers/iio/proximity/isl29501.c +++ b/drivers/iio/proximity/isl29501.c @@ -995,17 +995,16 @@ static const struct i2c_device_id isl29501_id[] = { MODULE_DEVICE_TABLE(i2c, isl29501_id); -#if defined(CONFIG_OF) static const struct of_device_id isl29501_i2c_matches[] = { { .compatible = "renesas,isl29501" }, { } }; MODULE_DEVICE_TABLE(of, isl29501_i2c_matches); -#endif static struct i2c_driver isl29501_driver = { .driver = { .name = "isl29501", + .of_match_table = isl29501_i2c_matches, }, .id_table = isl29501_id, .probe = isl29501_probe,