From patchwork Tue Mar 5 17:48:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 778179 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B11C117565; Tue, 5 Mar 2024 17:49:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660980; cv=none; b=gTSHfKj8tjzT+AAbHYo69OaqzY7cmGOaCzNiqhjVyLh8du6aAklAR9pSy9EJZaK1fp367qwkSERswd6WCqMciLyO8btSkYqDv68kD9Rg4YkJs/UW63YZHL1lzfOy9o14Xfh/i7nlKnJ8t2S4bx61iI1eCzZUfHipRoZ56j0p+7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660980; c=relaxed/simple; bh=CM6w5v/94UBYk5+XLsqdJrfk2UXwpgxCl68ULYV3MTg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WRIPFTvW37MPHayn6u9pbUmQOXZdeUDQlgrBbueripGG2ajDqoCYxfisjLe+JyTg0qVPlnlc/z3tniMVyMO+tahNrb9i1ZTM1U3PMquzTrA6H4Tc6ymvD278tIvwjr/1dB//i8NrkwLBWxKKE2724ewAOL+V0FfYS5FQRB/iVAk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RNxCVre5; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RNxCVre5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709660978; x=1741196978; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CM6w5v/94UBYk5+XLsqdJrfk2UXwpgxCl68ULYV3MTg=; b=RNxCVre504JefksvhY6f6UaVFM3LtmhxIU7HJ2zSoJMO6D2tbG14Qzq+ GTzkIQWPnm0w0tRC5uyJB4DPH/0PchWKlEWLSCgOR0tbDw8XSPapzDRYK PSmrxQTs+Zec6B0Fi4PV8Rib4VMgD3vRPE7PlEEQ7b6B27g8/ogSMPWD+ VGE8g+UhxIUzsN0IccmrQlj8+sKab/kRMD2gH4oaPOPK95f5Wy2doo13u Lt4oobdbh/DSFNQQX95Nx/pC5kACm0J4DguD8AvM3pfeSylYY9jEQ+Hpu yGeVBfDEpfqUOqCVwpMTBXut68dYTdw8bZx9Qief2lNxV7JQRKbNE0J6p A==; X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="4092442" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="4092442" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 09:49:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="937042795" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="937042795" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 05 Mar 2024 09:49:36 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2F23A1A6; Tue, 5 Mar 2024 19:49:35 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sean Young , Mauro Carvalho Chehab , Andi Shyti Subject: [PATCH v1 1/5] media: ir-spi: Don't use "proxy" headers Date: Tue, 5 Mar 2024 19:48:26 +0200 Message-ID: <20240305174933.1370708-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> References: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko Reviewed-by: Andi Shyti --- drivers/media/rc/ir-spi.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/media/rc/ir-spi.c b/drivers/media/rc/ir-spi.c index bbc81bed4f90..28437a35b7ba 100644 --- a/drivers/media/rc/ir-spi.c +++ b/drivers/media/rc/ir-spi.c @@ -4,13 +4,18 @@ // Copyright (c) 2016 Samsung Electronics Co., Ltd. // Copyright (c) Andi Shyti -#include -#include +#include +#include +#include +#include +#include #include -#include -#include +#include #include #include +#include +#include + #include #define IR_SPI_DRIVER_NAME "ir-spi" From patchwork Tue Mar 5 17:48:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 778177 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86D5517BA6; Tue, 5 Mar 2024 17:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660984; cv=none; b=Q6jvrWI+56r/NhBlR3aJP1CWCQZ6zE9gXS9L2rl14Vmtt13Ck8CHEthRlR6b0iGaTpEv87IvXjnaMJ4hGym5jT8nAWo3jydhFaAmrJ+QZMGrAwHk+WYA7DeGEIOES2c4F9PiI1ueS3ShE4QmUfD+Pg2G23pX7N+zMeuA7UUVF5c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660984; c=relaxed/simple; bh=3MlnLBgXOZG1+AlvXxdAehQKpjrynnwPtE67gW/4HCw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AIBKSo8wf1IZw51glewrxA+zu58qnr0ZdWGr9UlAugHuv+3Q6eIHs1b0ESIS4zlUYYM5NItXUFcDp8aCtZ6YWxJTgyRKoPVK290yoRhoRNQL3PK8TYWuMoGcSTaRvuVvFPkm3W8HJUNWXbt1xLZz3w/PkAJCjNA8qDCxpVA85+U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mvHLWkKL; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mvHLWkKL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709660982; x=1741196982; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3MlnLBgXOZG1+AlvXxdAehQKpjrynnwPtE67gW/4HCw=; b=mvHLWkKLiBevmFPEV+Jv5rw5qAJ8RlQqctoFnHomR7w4Pnj4CjkuCFUN q9SXJE/UFnJqxMzfINJKZnYF7QBnN467S9pc3n4j+WdiSGxtrRAGE3l6M k0pxE1XftoxanDRjOJwQvDs1rvXU5m5fQVsYNCjSiu8fyGlMdrk0FbvmV 189LbmNbZC0htknatNAh1/wzR8F07MJzoVCTAx6dGHoXbuucmNYtJ6CMW Pp5dY+TUKTdX1XtMSHQG3dNZ0qHA0KdQwPWO8HBGkpUNoFqR+BDcbLx1Z Isr501eQxL+mh3LH1piMVgkYnzsGVX9ojrIk/lljXINMrkO+Lw+5Brdx6 A==; X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="4092445" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="4092445" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 09:49:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="937042796" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="937042796" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 05 Mar 2024 09:49:36 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 423156FE; Tue, 5 Mar 2024 19:49:35 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sean Young , Mauro Carvalho Chehab , Andi Shyti Subject: [PATCH v1 2/5] media: ir-spi: Make use of device properties Date: Tue, 5 Mar 2024 19:48:27 +0200 Message-ID: <20240305174933.1370708-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> References: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko Reviewed-by: Andi Shyti --- drivers/media/rc/ir-spi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/rc/ir-spi.c b/drivers/media/rc/ir-spi.c index 28437a35b7ba..846d407a1f7e 100644 --- a/drivers/media/rc/ir-spi.c +++ b/drivers/media/rc/ir-spi.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include @@ -116,6 +116,7 @@ static int ir_spi_set_duty_cycle(struct rc_dev *dev, u32 duty_cycle) static int ir_spi_probe(struct spi_device *spi) { + struct device *dev = &spi->dev; int ret; u8 dc; struct ir_spi_data *idata; @@ -140,9 +141,8 @@ static int ir_spi_probe(struct spi_device *spi) idata->rc->priv = idata; idata->spi = spi; - idata->negated = of_property_read_bool(spi->dev.of_node, - "led-active-low"); - ret = of_property_read_u8(spi->dev.of_node, "duty-cycle", &dc); + idata->negated = device_property_read_bool(dev, "led-active-low"); + ret = device_property_read_u8(dev, "duty-cycle", &dc); if (ret) dc = 50; From patchwork Tue Mar 5 17:48:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 778178 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7F25175AE; Tue, 5 Mar 2024 17:49:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660982; cv=none; b=hh/xKYWGmB5i4+AWJr1RTtLrDR7Upkul6wpo/dQPuDDW2R43SpmIpufqoDCSzBEhKiTakw5xdS6c/OdiMtj30Cbn9JGEa2ifjMsxzSKgKAZAERXwW2qRqvUD7WCKujQkvRgVovoHGEi21Nylgr9J6QGxrJLax/xlYE4Hh+3YPuE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660982; c=relaxed/simple; bh=SGAjMyyUJKvoSZpDLONlB+1giYVnwmizKPUz/44JYUM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NomFU76J46b+xPnSpV4ZD0O5oHqLQ2GP/mu8MURG7BDH/9Y60nJ+Zi39rqZWA3W/zMnm9mvaRoByOUULiwkJLsFbhjR7pakYby05kQcTXlsDRqPcKIWeyxaSgkorQJbqHftbUxl3BXXJANKBZIcRIkjHPbxaA+Htm1M7bzi59bc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=G0LgqDzg; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="G0LgqDzg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709660981; x=1741196981; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SGAjMyyUJKvoSZpDLONlB+1giYVnwmizKPUz/44JYUM=; b=G0LgqDzgLsfMQilcd1r7ebr5PwoAI2nduAX4Pxq/D3EOzpYAiQGTeSng o3mNvQvaRe4QgzcJh1q3zju02kY5IQNhMwj0GUx1C/gZz3TiUEp6m48Oa B6aTVEYauU5owb3K/ZV6soohHv85dABpwjdx3l7XSXjO9rTu0Csyg6m5J qi59ZIYW5eRpqr5EuT33iLljW9Dlt4rHYEXlvHbQ3RfaBh1kafPTdGUVB deeAYMQl54TRGSVShTtejIT4R95mRKWxRKm0h/UhE2mW/RxZe7y8DCSpF CT2Y9f+pBSoRpZWyUPFE2uz1aNx/0RMlquav9DRPSSvmbNPljb23nnItN A==; X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="4092438" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="4092438" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 09:49:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="937042793" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="937042793" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 05 Mar 2024 09:49:36 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 48069697; Tue, 5 Mar 2024 19:49:35 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sean Young , Mauro Carvalho Chehab , Andi Shyti Subject: [PATCH v1 3/5] media: ir-spi: Utilise temporary variable for struct device Date: Tue, 5 Mar 2024 19:48:28 +0200 Message-ID: <20240305174933.1370708-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> References: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 We have a temporary variable to keep pointer to struct device. Utilise it inside the ->probe() implementation. Signed-off-by: Andy Shevchenko Reviewed-by: Andi Shyti --- drivers/media/rc/ir-spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/rc/ir-spi.c b/drivers/media/rc/ir-spi.c index 846d407a1f7e..19102bdcfd6f 100644 --- a/drivers/media/rc/ir-spi.c +++ b/drivers/media/rc/ir-spi.c @@ -121,11 +121,11 @@ static int ir_spi_probe(struct spi_device *spi) u8 dc; struct ir_spi_data *idata; - idata = devm_kzalloc(&spi->dev, sizeof(*idata), GFP_KERNEL); + idata = devm_kzalloc(dev, sizeof(*idata), GFP_KERNEL); if (!idata) return -ENOMEM; - idata->regulator = devm_regulator_get(&spi->dev, "irda_regulator"); + idata->regulator = devm_regulator_get(dev, "irda_regulator"); if (IS_ERR(idata->regulator)) return PTR_ERR(idata->regulator); @@ -154,7 +154,7 @@ static int ir_spi_probe(struct spi_device *spi) idata->freq = IR_SPI_DEFAULT_FREQUENCY; - return devm_rc_register_device(&spi->dev, idata->rc); + return devm_rc_register_device(dev, idata->rc); } static const struct of_device_id ir_spi_of_match[] = { From patchwork Tue Mar 5 17:48:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 779045 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F9BB17995; Tue, 5 Mar 2024 17:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660983; cv=none; b=OC9jQVk+9qrt0v3cQTEI/VuCzYyB/WiZNmHoD2cqygWsfvvWe74PzNDPFADZCAzRqIgPs2wn/Ucz6om5mGIKxG/F9E6wIBc7Z4b86Vo4dMkZy7NVDyaD28JWDFj2O/6aWjmb5OQFQvS9wFzXh1O23LTuom42L2DzjjBKXGPwy90= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660983; c=relaxed/simple; bh=1DZsC5+yI7D+7hL4sdGWoG5tYvav/8DJD0BJtC1dNTk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eT+WNaWxzgaERmAcTT08Peat7uOJPktL4jMSMJ91Pn962L0UzsNx9U4ZzGj94Yf6mVXdDFvZHN/bnAyAckkJl4/F6OZhix95jlK33n4v0CU2jBYE0VDpkOTQBYRU9wP5Q1ZOW4XGdVzpxQTB7P7QqLH25RkHiQlm0KkjUXjzFMU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gxFjD61T; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gxFjD61T" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709660982; x=1741196982; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1DZsC5+yI7D+7hL4sdGWoG5tYvav/8DJD0BJtC1dNTk=; b=gxFjD61TOoWRDdhw7/qWW8e19Ba74cJJZmGkdH0USYRzn+hNM6q9jyTv XMmYZTllPokdEAJOXo4RplfHWpXGvMcdRPc7cX3nllC6OtXSpy+CWEGwC tryLjz7E3z3LKID53jhh12KoX2AeH9KU8/BghMf7L1iOyOy5fY1qjZGAU pRCoqQcTq0+nfU0XxBt1JSVklqcRnp1Xqj91HE3DTgziMpE5PWf0P2s4k dH/s4NkZ6rconnpZAfoMVy8XUsnTWcOQMJlCStxcchKbkP5fl/gLfWpkF 7tTWBJnQgd58cnsRP9V+ilEsn9MoMDETrfiCFH/G6zxxHO2mmBUfKX+Kk A==; X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="4092448" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="4092448" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 09:49:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="937042797" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="937042797" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 05 Mar 2024 09:49:36 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 5C58A799; Tue, 5 Mar 2024 19:49:35 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sean Young , Mauro Carvalho Chehab , Andi Shyti Subject: [PATCH v1 4/5] media: ir-spi: Remove trailing comma in the terminator entry Date: Tue, 5 Mar 2024 19:48:29 +0200 Message-ID: <20240305174933.1370708-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> References: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Remove trailing comma in the terminator entry in ID table(s). Signed-off-by: Andy Shevchenko --- drivers/media/rc/ir-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/ir-spi.c b/drivers/media/rc/ir-spi.c index 19102bdcfd6f..801de3d108cc 100644 --- a/drivers/media/rc/ir-spi.c +++ b/drivers/media/rc/ir-spi.c @@ -159,13 +159,13 @@ static int ir_spi_probe(struct spi_device *spi) static const struct of_device_id ir_spi_of_match[] = { { .compatible = "ir-spi-led" }, - {}, + {} }; MODULE_DEVICE_TABLE(of, ir_spi_of_match); static const struct spi_device_id ir_spi_ids[] = { { "ir-spi-led" }, - {}, + {} }; MODULE_DEVICE_TABLE(spi, ir_spi_ids); From patchwork Tue Mar 5 17:48:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 779044 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E10217BA7; Tue, 5 Mar 2024 17:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660984; cv=none; b=RdDNWz5Jh+zxZeC8NP3MAHO0WVs/tu3WeVYI70+cMGpXURT0QnpyimsJx4HMp6fwaduiVoAvryVOfsjUwNjLupRrb367PL2Y3E/1xiJbivx/h/7RmzkBBEVGIRp3+zBs9LwuLAhUwgDSM/18AbAsDiJ8e8Buki5c8EwmUnVb434= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709660984; c=relaxed/simple; bh=q66Wb9ahMc8HcoBEjdZcQx4TA4GGv5WTs+e4hGRLHx0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t/lpb2Z6AYtpltlQG6TgMgwWC6fYDM3FjCXz2pPTgK8ZMttneXWxbBSBdub5c68wJy8yjC547dE+fr3aZ4l6pIaSMR6Vwje1Qttu3E8sNjrBIoOYDRSWd6+Da9IZOFs4ENVVNcD/bGFppE7xa4Wq76vRWr8mtotnHzvUzE72xlc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=YjRofGoI; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YjRofGoI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709660982; x=1741196982; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=q66Wb9ahMc8HcoBEjdZcQx4TA4GGv5WTs+e4hGRLHx0=; b=YjRofGoIkEyuWAZ64qfiigWdeB6VCTWr6Dg/LoZp71B9hS7aY5rrXLKK z3VmTxqLFeHhaDextH6mKFZgsmKHv6TOohidyu2iOT/BFoCWXOPH4TaL7 s+NLip7FX6O1LPk9PbKTPbMie/exV4GBiInL9aSd26XbX58ZXGNmNCh1n H3Nsh2DQUm4VLq57XWGyTwprhIbVgP/HYYyizJ5n+nWYtkyU+d0unWt0a Y53IrEB9ulZF2oOtCCTDEiF65DU34+Nft6GEq0XEJFs50u1LhNV9QLZO2 /YlbcDs5xOM57phK4sZN9splgRxMFDdUM3mTLIf+crqSFgYBC/DX5B/uy A==; X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="4092456" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="4092456" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Mar 2024 09:49:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11004"; a="937042798" X-IronPort-AV: E=Sophos;i="6.06,206,1705392000"; d="scan'208";a="937042798" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 05 Mar 2024 09:49:38 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6BAC374C; Tue, 5 Mar 2024 19:49:35 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sean Young , Mauro Carvalho Chehab , Andi Shyti Subject: [PATCH v1 5/5] media: ir-spi: Unify indentation and comment style Date: Tue, 5 Mar 2024 19:48:30 +0200 Message-ID: <20240305174933.1370708-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> References: <20240305174933.1370708-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Unify the indentation and multi-line comment style. Signed-off-by: Andy Shevchenko --- drivers/media/rc/ir-spi.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/media/rc/ir-spi.c b/drivers/media/rc/ir-spi.c index 801de3d108cc..8fc8e496e6aa 100644 --- a/drivers/media/rc/ir-spi.c +++ b/drivers/media/rc/ir-spi.c @@ -36,8 +36,7 @@ struct ir_spi_data { struct regulator *regulator; }; -static int ir_spi_tx(struct rc_dev *dev, - unsigned int *buffer, unsigned int count) +static int ir_spi_tx(struct rc_dev *dev, unsigned int *buffer, unsigned int count) { int i; int ret; @@ -57,7 +56,7 @@ static int ir_spi_tx(struct rc_dev *dev, return -EINVAL; /* - * the first value in buffer is a pulse, so that 0, 2, 4, ... + * The first value in buffer is a pulse, so that 0, 2, 4, ... * contain a pulse duration. On the contrary, 1, 3, 5, ... * contain a space duration. */ @@ -146,9 +145,9 @@ static int ir_spi_probe(struct spi_device *spi) if (ret) dc = 50; - /* ir_spi_set_duty_cycle cannot fail, - * it returns int to be compatible with the - * rc->s_tx_duty_cycle function + /* + * ir_spi_set_duty_cycle() cannot fail, it returns int + * to be compatible with the rc->s_tx_duty_cycle function. */ ir_spi_set_duty_cycle(idata->rc, dc); @@ -177,7 +176,6 @@ static struct spi_driver ir_spi_driver = { .of_match_table = ir_spi_of_match, }, }; - module_spi_driver(ir_spi_driver); MODULE_AUTHOR("Andi Shyti ");