Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1107383ybf; Thu, 27 Feb 2020 05:11:22 -0800 (PST) X-Google-Smtp-Source: APXvYqzWhkisiaP/+7NhS7vBvw/1YI6JLX4pQ4DuSgsy+923TP9OvCLRybWsZp7Z6cGR9ce/OwSH X-Received: by 2002:aca:ed94:: with SMTP id l142mr3257076oih.58.1582809082181; Thu, 27 Feb 2020 05:11:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582809082; cv=none; d=google.com; s=arc-20160816; b=T5VIJBNTYyWLLjAGQBOtpHYFjBeoIP0cmYYIvYct8haJO9sQyiRrr5vYsU0DA2EamO 2hB7wJzSsqI0OfREycrHa+5YoNOVagqDV78Bqcrt/K67ypqn/Kp7YJ8ZombW0VBDcynw 1GNP6jTWQZVZznBgjECBksQrrZl3ymkMKUH2DadmhW8naJCJy+HX6RAQqkFrqbLeIhe3 bbZfqkFDKlVTVnoqgqEU29Yzy6WRCmQuaHwUY9orhto9y2lvpmB2x/QCz5P6BRxqb3hg kziMFSOsmVyjrx3xgma7+qP5DhySNe6OtNEOjRLHr+uknUueRtl8hln6Q0Ejq5XmA/7a 4rFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=tlUfurl/KlSN3jw+LHia+VEhSlzLR7OuYhZQi9litaE=; b=E0OJxhfXoywVkKDrQiYOvwdFuA7Q6lXElegLrTfWOi1g9XyehwTKR/phcl0BWmSPFi svMrM8lEBKjDLypDZ0V00cmRyxmMOpJp8Vej8a38TyVEjmFWlEb5sRmylSBp6C8GKwGD a26EIM5X6aNEpvoVGCd+4STvP0mSaU9Jce0h/KvhN7tnzxuZkcATPKM8kc71My0FVoNO BET7HpyqpMQL930jGr2Z8WliMCVf8v6lIOtqd6dAwNmkKRxWHsTvV9xzqfBA7f+f1Ykw QrIj7ZX2bYK3gwUpKQpHGuA22H1Kp/XaZMDtoGxONlnqL2Jwm6DuRnRyWu3HCUkIUeTL a3Bw== ARC-Authentication-Results: i=1; mx.google.com; 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 s82si775338oih.240.2020.02.27.05.11.10; Thu, 27 Feb 2020 05:11:22 -0800 (PST) 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; 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 S1729114AbgB0NKx (ORCPT + 99 others); Thu, 27 Feb 2020 08:10:53 -0500 Received: from mx0a-00128a01.pphosted.com ([148.163.135.77]:45908 "EHLO mx0a-00128a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729032AbgB0NKx (ORCPT ); Thu, 27 Feb 2020 08:10:53 -0500 Received: from pps.filterd (m0167088.ppops.net [127.0.0.1]) by mx0a-00128a01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01RD5FTk031759; Thu, 27 Feb 2020 08:10:19 -0500 Received: from nwd2mta3.analog.com ([137.71.173.56]) by mx0a-00128a01.pphosted.com with ESMTP id 2ydtrx36se-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Feb 2020 08:10:18 -0500 Received: from SCSQMBX10.ad.analog.com (scsqmbx10.ad.analog.com [10.77.17.5]) by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 01RDAHLF011273 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 27 Feb 2020 08:10:17 -0500 Received: from SCSQCASHYB6.ad.analog.com (10.77.17.132) by SCSQMBX10.ad.analog.com (10.77.17.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 27 Feb 2020 05:10:16 -0800 Received: from SCSQMBX11.ad.analog.com (10.77.17.10) by SCSQCASHYB6.ad.analog.com (10.77.17.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1779.2; Thu, 27 Feb 2020 05:09:42 -0800 Received: from zeus.spd.analog.com (10.64.82.11) by SCSQMBX11.ad.analog.com (10.77.17.10) with Microsoft SMTP Server id 15.1.1779.2 via Frontend Transport; Thu, 27 Feb 2020 05:10:15 -0800 Received: from analog.ad.analog.com ([10.48.65.180]) by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 01RDA5JO025879; Thu, 27 Feb 2020 08:10:06 -0500 From: Sergiu Cuciurean To: , , , CC: Sergiu Cuciurean Subject: [PATCH] media: spi: gs1662: Use new structure for SPI transfer delays Date: Thu, 27 Feb 2020 15:10:00 +0200 Message-ID: <20200227131000.29264-1-sergiu.cuciurean@analog.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-ADIRoutedOnPrem: True X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-27_03:2020-02-26,2020-02-27 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 malwarescore=0 impostorscore=0 clxscore=1011 priorityscore=1501 lowpriorityscore=0 phishscore=0 spamscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002270103 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In a recent change to the SPI subsystem [1], a new `delay` struct was added to replace the `delay_usecs`. This change replaces the current `delay_usecs` with `delay` for this driver. The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure that both `delay_usecs` & `delay` are used (in this order to preserve backwards compatibility). [1] commit bebcfd272df6 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Signed-off-by: Sergiu Cuciurean --- drivers/media/spi/gs1662.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/media/spi/gs1662.c b/drivers/media/spi/gs1662.c index d789d82df7c4..56c30ca97d6b 100644 --- a/drivers/media/spi/gs1662.c +++ b/drivers/media/spi/gs1662.c @@ -147,11 +147,17 @@ static int gs_read_register(struct spi_device *spi, u16 addr, u16 *value) { .tx_buf = &buf_addr, .len = 2, - .delay_usecs = 1, + .delay = { + .value = 1, + .unit = SPI_DELAY_UNIT_USECS + }, }, { .rx_buf = &buf_value, .len = 2, - .delay_usecs = 1, + .delay = { + .value = 1, + .unit = SPI_DELAY_UNIT_USECS + }, }, }; -- 2.17.1