Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1349724ybp; Thu, 17 Oct 2019 11:26:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/mq+q7QqQaA+mQGFfkfmpnbiyix1WVrN2HbplPkzQHoj8NS+lynAZ+IXy7rmfxHKpd2Mq X-Received: by 2002:a17:906:520a:: with SMTP id g10mr4794611ejm.85.1571336785166; Thu, 17 Oct 2019 11:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571336785; cv=none; d=google.com; s=arc-20160816; b=cJfQTmh8931WGc8BLRgmxFRUJ00t2YNzPBSb5LUO98/LEpYk/ur/hpQA0ON0pmXzf7 cWo9Ckft14B3HGXgvLn4stbnjW+dDn4ddOL8Pl1z2AUIiuVaH1aHNgyZxvh+Rsb5tTjZ u1e3rlGkekzQF8SGePoyhyibGt3N2t4NNROCb1ld3wRRq+C2215Yf+M9GrnSWGsQrKW8 6kIfaN5gmDMK7tXquLrd0yf6g4Ct3xRKBX3DSuveSX5NLLBNjrLm2GhITV73Hqt9dYOJ e5dm64pcoVJONno3emIyFLO3OzqY71cTKNksHKdVHD8JWSRP9VKze1z+6zXqNOrgvTU/ G+3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QxymIoMt3QxnI3KHiObaRcTCSG/DkRxTCeWxXGTqFUM=; b=EExaoqDMFdOuTj0MoHqnPuHQscNGqi2yUxSoAHWXoltL3KNC0oAQLh1Nk7tbAUWv2A k577IftwK4dTWsz5FIOb+T4cz+mafTjuG/h8DybbD5P8emkmiDHMb2i5VntB+Ql2Lupx kQfXlKFRVt/y+YZevXy1xYOP+832xtrnTQpvq4BOnnfh61OdrwFpqIXPTrucwE+u89ut Dc7S6xjhFUf6B9vroTnpS1MjznU5P5vGweLS61S1hcuXZBTTpbm6H6VdfB3HDoneS4mD H6+2B+/kLeL0mcsHaCasLljNXnJkUBXjCAdMH+qNrkwtbVlP8JgTPNy+yvBiigHTZ+9P s+vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LZwYYhOc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rn2si1808082ejb.14.2019.10.17.11.26.01; Thu, 17 Oct 2019 11:26:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LZwYYhOc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406799AbfJPWDQ (ORCPT + 99 others); Wed, 16 Oct 2019 18:03:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:54306 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2438513AbfJPV72 (ORCPT ); Wed, 16 Oct 2019 17:59:28 -0400 Received: from localhost (unknown [192.55.54.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 51ACB21D7F; Wed, 16 Oct 2019 21:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571263167; bh=zulwJW+pFqxRdc+QRRcLKC+H8uvFao+73JzAqy7FiWs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LZwYYhOcHL98n8GC3NUxnRZxq4cdvoqb6G4Dcbw67bErHqlTxjI1xYTv9Brf5M8pq j+jFppqlnRrv/onoABxtUILdFyAnxxcI68Rdsv7v5rHezcWwhjlXh9O7mPID7/+n5n fCtaH9F0UwPCe9PEQIT3PYlDyqzocAvBY4w8hi/o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marco Felsch , Stable@vger.kernel.org, Jonathan Cameron , Sasha Levin Subject: [PATCH 5.3 095/112] iio: light: fix vcnl4000 devicetree hooks Date: Wed, 16 Oct 2019 14:51:27 -0700 Message-Id: <20191016214905.888866494@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214844.038848564@linuxfoundation.org> References: <20191016214844.038848564@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marco Felsch [ Upstream commit 1436a78c63495dd94c8d4f84a76d78d5317d481b ] Since commit ebd457d55911 ("iio: light: vcnl4000 add devicetree hooks") the of_match_table is supported but the data shouldn't be a string. Instead it shall be one of 'enum vcnl4000_device_ids'. Also the matching logic for the vcnl4020 was wrong. Since the data retrieve mechanism is still based on the i2c_device_id no failures did appeared till now. Fixes: ebd457d55911 ("iio: light: vcnl4000 add devicetree hooks") Signed-off-by: Marco Felsch Reviewed-by: Angus Ainslie (Purism) angus@akkea.ca Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/iio/light/vcnl4000.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index ca0d27b46ea22..16dacea9eadfa 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c @@ -398,15 +398,15 @@ static int vcnl4000_probe(struct i2c_client *client, static const struct of_device_id vcnl_4000_of_match[] = { { .compatible = "vishay,vcnl4000", - .data = "VCNL4000", + .data = (void *)VCNL4000, }, { .compatible = "vishay,vcnl4010", - .data = "VCNL4010", + .data = (void *)VCNL4010, }, { - .compatible = "vishay,vcnl4010", - .data = "VCNL4020", + .compatible = "vishay,vcnl4020", + .data = (void *)VCNL4010, }, { .compatible = "vishay,vcnl4040", @@ -414,7 +414,7 @@ static const struct of_device_id vcnl_4000_of_match[] = { }, { .compatible = "vishay,vcnl4200", - .data = "VCNL4200", + .data = (void *)VCNL4200, }, {}, }; -- 2.20.1