Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4020880rwe; Tue, 30 Aug 2022 03:15:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR6zmRTTnJM/OR4JvvR/+eFUyUBnEbnBDtnZnbKQCza7j3twnSkeEvu14I27yMyKuzXXatm9 X-Received: by 2002:a17:903:2c7:b0:16c:ebf6:db22 with SMTP id s7-20020a17090302c700b0016cebf6db22mr20475076plk.16.1661854534143; Tue, 30 Aug 2022 03:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661854534; cv=none; d=google.com; s=arc-20160816; b=tAnCIkse7W1WOH3tuaYfqvOu7CCrZkQpKOHQuyKQYJFhRnls192xW5vCGKvHCewUHi xPRpwxUpkk7SQ0AYeD72IHOp0Ph/msZG+LRGSBzE+6VmOrJ2ZpeGEE0Bh5Vde2vujXoR AJxQIvbf3VoOjXI7PZbKsxv0vB63eRTt1IaVZ9dBj+fibSBZsEQw1VhNGhW6wTu+NTIp aDFtTvqDGoJY/+c6CRj88+EK7Cal9GxdY4owdj+IsPbbin77VWspAdEA+/HaAKRUeaOy L8i5M0ar024VDBXAYcvX0WveM19/Em0M+Y4EkYJGCEfY+mL++5iVVRclWH6uCqJRd0mP Ulbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ujio0bEzfH+9rUBEwCRFEVlch5eJO1HsdYpiFACcp/8=; b=CTK7YO6oNL6jqMyRyRor3PnqeqIfh54FbqCI0GYx2FFOCvkQobk03J2IqyqE8Xecnv 7LMuDROlVRnQvAuxnc4qZHdN4CtFPm3vFM1cEcp7ePNPfD52gou14gISq5LoV6x+bota DBcwAwy+C0OPGjVM82jwkxdwfltvD+EUtNqpUMqy/26oTUF5XY0qZwkXo7ptNvd/HLEt +JrdBi/PjeChFgEhI9sgceO0dic16K6WXl916+AgpcnbjBuYPg3KBBLVnYrYVihrH+VL qAxSxy5jayMXDL/ZKKzt0yyJ4bXIEDM+lkLS2RYQw2zGIhiwCaQCwpyl7BARcPFI/9X/ xiDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=diCNxWgz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r2-20020a170902c60200b0016f18b82145si10234673plr.265.2022.08.30.03.15.22; Tue, 30 Aug 2022 03:15:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=diCNxWgz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229897AbiH3KFL (ORCPT + 99 others); Tue, 30 Aug 2022 06:05:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229840AbiH3KEG (ORCPT ); Tue, 30 Aug 2022 06:04:06 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0BEDE9275 for ; Tue, 30 Aug 2022 03:02:05 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id q7so14782370lfu.5 for ; Tue, 30 Aug 2022 03:02:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=Ujio0bEzfH+9rUBEwCRFEVlch5eJO1HsdYpiFACcp/8=; b=diCNxWgz1aqkX1plRZyuGSrPZV8oH/eErVfFkGJ4tKIPC7jAe5AuV8wRf9MXBSQpNu YgM4he1Ub9dGcN1aPiQs47Hn5+7uhhhuIMAswkvjDCW/qpOgcWWF+hQiYm+30Z3mmcb2 27iwtHGryPTRjCB/t+nVKHwGruHcvUM2NF74w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=Ujio0bEzfH+9rUBEwCRFEVlch5eJO1HsdYpiFACcp/8=; b=vtm1DoCKDoggEVhRKa3dMvInzfndoi2jJd5qk7K9pyy9JJPKOpNMe/ou3fr73sZSYo aDv9ws40l87+22PnO/3hGDOUtIgAlQ6Tl/4JOaUBlW6StMQvHD1xO6ZCeMGk0g2BpjUG no/qnUDM5M93npP/oItk0MQkFY5ayKu0ZGv5G2iL1+IjQrvDqoXKuVAAmj4UDV5ujpEV SmDImrqmt2hvJJilZo5TJn8IAzaO+yk8xAmEeL1+lUd/7U2dqIeyX49+Rq26wEGMgBnH +EpXhJCnM4jViSahORjy0m8wLolovOCpF4n4GlsxQa7g8mk6nrS5lCoPdQxNjS7HtyBK VBnQ== X-Gm-Message-State: ACgBeo2mME39lmagAb8jAcEBAjSZWtc1yE2bUHdLj5KxS/WDIkANza4I 6Vs1XYZEJ3hcSrsIqmhbSsKyiQ== X-Received: by 2002:a05:6512:1524:b0:48a:aff5:59d0 with SMTP id bq36-20020a056512152400b0048aaff559d0mr7005849lfb.122.1661853723938; Tue, 30 Aug 2022 03:02:03 -0700 (PDT) Received: from prevas-ravi.prevas.se ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id m6-20020a056512114600b0048af6242892sm1573435lfg.14.2022.08.30.03.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Aug 2022 03:02:03 -0700 (PDT) From: Rasmus Villemoes To: Alessandro Zummo , Alexandre Belloni Cc: Rasmus Villemoes , linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] rtc: isl12022: use dev_set_drvdata() instead of i2c_set_clientdata() Date: Tue, 30 Aug 2022 12:01:49 +0200 Message-Id: <20220830100152.698506-4-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220830100152.698506-1-linux@rasmusvillemoes.dk> References: <20220830100152.698506-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As another preparation for removing direct references to the i2c_client in the helper functions, stash a pointer to the private data via dev_set_drvdata() instead of i2c_set_clientdata(). Signed-off-by: Rasmus Villemoes --- drivers/rtc/rtc-isl12022.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-isl12022.c b/drivers/rtc/rtc-isl12022.c index 5e6bb9153c89..234201ea2f7d 100644 --- a/drivers/rtc/rtc-isl12022.c +++ b/drivers/rtc/rtc-isl12022.c @@ -153,7 +153,7 @@ static int isl12022_rtc_read_time(struct device *dev, struct rtc_time *tm) static int isl12022_rtc_set_time(struct device *dev, struct rtc_time *tm) { struct i2c_client *client = to_i2c_client(dev); - struct isl12022 *isl12022 = i2c_get_clientdata(client); + struct isl12022 *isl12022 = dev_get_drvdata(dev); size_t i; int ret; uint8_t buf[ISL12022_REG_DW + 1]; @@ -242,8 +242,7 @@ static int isl12022_probe(struct i2c_client *client) GFP_KERNEL); if (!isl12022) return -ENOMEM; - - i2c_set_clientdata(client, isl12022); + dev_set_drvdata(&client->dev, isl12022); isl12022->rtc = devm_rtc_allocate_device(&client->dev); if (IS_ERR(isl12022->rtc)) -- 2.37.2