From patchwork Wed Apr 13 18:34:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12812370 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 715FDC433EF for ; Wed, 13 Apr 2022 18:34:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237756AbiDMSgv (ORCPT ); Wed, 13 Apr 2022 14:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237760AbiDMSgt (ORCPT ); Wed, 13 Apr 2022 14:36:49 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F22585FB7; Wed, 13 Apr 2022 11:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1649874867; x=1681410867; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tqdiP8eymdT01+dQE/j7jvUQJEU8T8q8nv/Aq0uBY14=; b=l2R/al7JYG3FFmVSi2U5OlgT7niZlGgAoUKv3RzjCK6wDXFHWa1LzHiJ 83UA7I+V4JxBsOQOWiu+J9VpvIu5aRVciqdkLKSnwbiXr4pwZ/FKpoSVI bIaP0ryS70LTzBRRD4GD8sj6QcV+vk/SvQNCM0LcuRNecowy7NCKZLsym JqDWOXOqU37PWJ3jhERVEJtZfJsjmjIUg5fqDsTm6JXF9cJR9OyZM97ow J8dOa0Oa+oAAVzS3iAwAACAYPFlCwyHAUcLhZsyzk3sYSORzNWORsrgIs HdPu0l0jjIiDDchEQpIkdej34W38P+b6oWO689TJ5gdPqSdk66vhZ0L5r w==; X-IronPort-AV: E=McAfee;i="6400,9594,10316"; a="244631163" X-IronPort-AV: E=Sophos;i="5.90,257,1643702400"; d="scan'208";a="244631163" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Apr 2022 11:34:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,257,1643702400"; d="scan'208";a="611995131" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 13 Apr 2022 11:34:22 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id C947012C; Wed, 13 Apr 2022 21:34:22 +0300 (EEST) From: Andy Shevchenko To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Andreas Klinger , Jonathan Cameron , Lars-Peter Clausen , Andy Shevchenko Subject: [PATCH v1 1/1] iio: proximity: ping: Replace OF specific code by device_get_match_data() Date: Wed, 13 Apr 2022 21:34:21 +0300 Message-Id: <20220413183421.20427-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Instead of calling the OF specific API, use device_get_match_data(). Signed-off-by: Andy Shevchenko --- drivers/iio/proximity/ping.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/proximity/ping.c b/drivers/iio/proximity/ping.c index 24a97d41e115..d56e037378de 100644 --- a/drivers/iio/proximity/ping.c +++ b/drivers/iio/proximity/ping.c @@ -29,9 +29,8 @@ #include #include #include +#include #include -#include -#include #include #include #include @@ -288,7 +287,7 @@ static int ping_probe(struct platform_device *pdev) data = iio_priv(indio_dev); data->dev = dev; - data->cfg = of_device_get_match_data(dev); + data->cfg = device_get_match_data(dev); mutex_init(&data->lock); init_completion(&data->rising);