Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp741313ybk; Wed, 20 May 2020 10:47:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpUIFnSfcYmlngn1hdBZoxEPyjmuRArEAAr/n3UfOLFxMOcoNKX0c7oVJqeJ+y8ozhjOjr X-Received: by 2002:a17:906:584e:: with SMTP id h14mr173988ejs.257.1589996844253; Wed, 20 May 2020 10:47:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589996844; cv=none; d=google.com; s=arc-20160816; b=ZFns9VwZBN5L+ymfag+bcSFIwB0RAPLWY9w4SXGW0M7DxCsUwYYBHPJ5w13UbJTHzu g4GlB9S/EA89K//tI6pF+a9/YHBTdo245rnEwXQNXAPS8IZGZSEtreE07HgT560yoxHy PQF+kvVKvV+aRCk0EVv0/f3dwIGE6kcUz+x1NRHdFDPJfA9qs3Bqej6pkIZHWcHsRITj TwPm+NLPjrfADL+aLDw+eQBMQcGlClGZd/CgOLjfxkpH/M+gxhks7iQbLjKkX5JrQtoU x3iHl8RK3KIfa+vdodupEnGlpsaCG+V8g68/H/dGFUS3BQUnUbtk+V6p9fBbGIYMLlA9 kB1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=EfR9abvjfYeSu2gOpoQjslxf3ylmODDyibdHeuoKSnQ=; b=GcuvfaDhOVlx6mU+ZE7iIA3N52dTnnGfdQTNFMQb1lTeqikvRCkHRitNcUGLYXtU7I w5JmjYqlrBvR+9QZR5D7duqwtOOAYvziIZtcbzXauLXCXB4VBJWQknlnD9DJQ/5ltF09 Y1ILJQ2X22M+dsnHmVMetulcW9EdyUQ1Kae8cdVtZMFcrBlezyDUVqUh7Y/g6vqD2/+5 sdIN0roX9yPhhq/dgB1qeXHtpkRnNzB1ZMwTsiGpn+rhQw8vC85cM7/MTe+tHnwDg7bB ge4EjOHXMMMRZ6h5jY+NCs+OV23FIPAo3hmyAJeGVqHtqTerc3gTbCHN9B9g9DzXZOQ6 puVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rDM3xe4K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si2124612eji.466.2020.05.20.10.47.01; Wed, 20 May 2020 10:47:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rDM3xe4K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726747AbgETRpY (ORCPT + 99 others); Wed, 20 May 2020 13:45:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgETRpX (ORCPT ); Wed, 20 May 2020 13:45:23 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89033C061A0E; Wed, 20 May 2020 10:45:23 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id a13so1633523pls.8; Wed, 20 May 2020 10:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=EfR9abvjfYeSu2gOpoQjslxf3ylmODDyibdHeuoKSnQ=; b=rDM3xe4KWRWQelmyP4mTMwjuh5WmcZKYyi9OdmrfaHaiMOlYmooQGnpaYtCXHNPajQ ORm3rYGv/4HJycjjBwwXtqsfTRX8DMCklSJLc9zopKuEd4xBWHkKET7AHqup+f2XljkX twAisaVxkFmULfNTWrEZjING2pUJV9yUN9oAz8eaeOduFQAAmfXQ1Pjg8zPe0zeQ3Uct O00+cmAHfYnkFwePomPWLWI32kqeraDbyhpnJzMXv6ZuKk6KBdhkWBevjXu+FQE9Vauo fJuWYc5UeJ/nd4uwj/W0pGAuq9aN8uMFtGeNrC7oIcYQB06drPUBF62yoMTZY17Qly9c t7ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=EfR9abvjfYeSu2gOpoQjslxf3ylmODDyibdHeuoKSnQ=; b=JsB45+GXzKCFupRXLFO38yjiq2drDToQSBsRatSER3ZHWlXLaLdEGJxK7AsdSHcaQz Ia5JMKYwBXw4Q7hiQnfqCXlJccyuxEMLR5wnfcxZenf5JYBl8gntVIiUPnYi9EJILTAf y6LVvS1kvcLtjunXybkfFWi4Q3ppugavXpt2I0gqyyiHDjJmlWnwbK4PRg/CTVWzEDrz ULExHfe8EnkP7R1LhIn5i/vY0UMgywCVRoXz3TzTQH/+3bazF24obZXqFk1yydWB02ki riyDmHYBlXyzG9r6L2O8PXq3DBJyEMnfw/Vv4Glb2Ex4gsLYDcySehgEIVZouseQItQ9 v+Jg== X-Gm-Message-State: AOAM531f0fOu4MAYsh+ZGnjqaLyBCqKMY14BeVwky+ZH5MVcpGvo62Oe bMHcpx7wCeDN4NLaaCcKpnU= X-Received: by 2002:a17:90b:1288:: with SMTP id fw8mr6605137pjb.160.1589996722085; Wed, 20 May 2020 10:45:22 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3c2a:73a9:c2cf:7f45]) by smtp.gmail.com with ESMTPSA id m2sm2506053pjl.45.2020.05.20.10.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 May 2020 10:45:21 -0700 (PDT) Date: Wed, 20 May 2020 10:45:19 -0700 From: Dmitry Torokhov To: Sebastian Reichel Cc: Ahmet Inan , Martin Fuzzey , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCHv3 3/5] Input: EXC3000: add EXC80H60 and EXC80H84 support Message-ID: <20200520174519.GV89269@dtor-ws> References: <20200520153936.46869-1-sebastian.reichel@collabora.com> <20200520153936.46869-4-sebastian.reichel@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200520153936.46869-4-sebastian.reichel@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On Wed, May 20, 2020 at 05:39:34PM +0200, Sebastian Reichel wrote: > > data->client = client; > + data->info = device_get_match_data(&client->dev); > + if (!data->info) { > + enum eeti_dev_id eeti_dev_id = > + i2c_match_id(exc3000_id, client)->driver_data; I believe i2c devices can be instantiated via sysfs, so I think we better handle case where we can't find matching id. Also driver_data is enough to store a pointer, maybe we can have individual structures instead of using an array and indexing here? Thanks. -- Dmitry