Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1645185ioo; Sun, 22 May 2022 22:49:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyD1MY3PlLY8g/ZhH5yL4/b1kGYzWxQtUuzHKac9o3E7gDA7elbyYeus+ch/YaW3WzvU3rh X-Received: by 2002:a17:90b:946:b0:1df:4b91:9924 with SMTP id dw6-20020a17090b094600b001df4b919924mr24298650pjb.180.1653284984142; Sun, 22 May 2022 22:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653284984; cv=none; d=google.com; s=arc-20160816; b=VRGorkQFmsplqNQyQZRpb15zzyt6tj6BHMR7BeJMTjKBKuUq5K9dUQlNLzgwKOXekc XFRINUGy0fNgb7wO/EOvaFjdej7CXt15y7dTZUoB1UD0pA8xfo6Q6jgkv3ObEByESV8y +eRwUpTOE77Y/S4y5byj1dfWfvmdVmORudA3g5qMNKgLjhcc9jJ6NmZPBiOFMjs30TUG aMQCxAEUhZ/KP/de86B91jKkhBxoVaagSCnUrpLVzdXvL/wVGzFeAxSVG+EpXy4OsiH6 V2M2eJzo5RPIU7oNNtc033t5xlfJs2PN3t31J8SF8Eo+N2QHmx9VrcQ16aRDM/sHpvLj Rrng== 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=LSTVujSZxd7jybS/Xm7tv3qPDlYb2MEOHKZDRGbEpQ4=; b=e6bP3kPBdPZmGNRw+pVTHI8VhjVhZcO0z+sHbJLO99aLAwV7G/HRrje5lVXpWmPVqN UVcV7Pkhk7j20oNXfRNQEWF8oR3avtUdqtJiLTSu/lqanGYomZTltBB8iDOVTtaSEfOz aq55fTylg8WyofpikZHog4r5rdgmgRRsDEj72XQe8leFb3u/fjc8VKDk8C2k4ONMi+wA oV3UA3vyEDMv4QlRLrxlysfg41mGCrNqkQoEKRghPbrPu+6wrQrbo/HB8vTkBSryRRdd It35wMBzYrYA5n5z+Mc0c3RcGcCrT1fuz9Jm3pTP8TYoheSY8xZaOogZyEiXrlPAUURA hHrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dJg9CQe3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t191-20020a6381c8000000b003ab3da7b5aesi8420318pgd.531.2022.05.22.22.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 May 2022 22:49:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dJg9CQe3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 77E312A73F; Sun, 22 May 2022 22:48:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352822AbiETSfH (ORCPT + 99 others); Fri, 20 May 2022 14:35:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352717AbiETSer (ORCPT ); Fri, 20 May 2022 14:34:47 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 697AC195783; Fri, 20 May 2022 11:34:46 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id m20so1473798wrb.13; Fri, 20 May 2022 11:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LSTVujSZxd7jybS/Xm7tv3qPDlYb2MEOHKZDRGbEpQ4=; b=dJg9CQe3nx273fBEBZF9WXB3LktQmm+FfckxuUxi32ZHs5Hnk9iwWc49xyjTpTK85r UbolqjCZgEvqbWO3Z9hFSBMhiQutha2QIf9FIt7VjTUHjsjRZt/KgX7Cmq8TgL1Vpl2L my39hrNeKD2g/2GCAsx6qptExQRN5QNKiqvbQkDwhZMVXXeHr2+MXnZQsAe1w6anupgn Gpzht8aV3N/xQi7xPJ068ufGTB1ivTUdw2elNrZw/uaSuRY0p7I9JzUCPSbk/U9okiWQ EDGYP7EbCKTH3x6UO9XdH9Sz4/2Y9rL1Wa2ftb8zVFpKW79T85nRGoORlKuDrVrMIrmq UMpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LSTVujSZxd7jybS/Xm7tv3qPDlYb2MEOHKZDRGbEpQ4=; b=A+HvFrwk46GApWQkPf8Oa4mLITCYaSMzRDD/WJnEZz8ZTlnoKCfqaJluSrjXNoCfyF +I4MfFHoN0CY2qxh0y/qcRgjy/rczlJruH5CPPwvHBuC+OIQDUYBpsLi65NQv/IDAO/S YmdIYfGdMleyz8oad2dI9YShf9JyfUZawvLP9941I7NfypgeNs4cbcZAMMdlPdrfPcGq 995H7cVjr88jiKlW31pZkakO3p1dtDZ93sz+WF9pyo/MPi01HBj1wqQBQzdZL8Qsll9c Hhq/u47uFH5ms6L1zH5wz/Gz32murncnoXd52jVHwc4/IVrSE1hsMX2eVEKjbpc+BKGD unLQ== X-Gm-Message-State: AOAM5320J3/HAQS1sFaQhrsOVqnZ0XvhUx9jQoti5ciX5tiLd5gUu1Dx 2OEoR3UQsuMLMmRj7Gb/+MeAZEPLlHU= X-Received: by 2002:adf:f24c:0:b0:20c:fe15:504c with SMTP id b12-20020adff24c000000b0020cfe15504cmr9404828wrp.123.1653071686072; Fri, 20 May 2022 11:34:46 -0700 (PDT) Received: from xws.localdomain (pd9e5a9fe.dip0.t-ipconnect.de. [217.229.169.254]) by smtp.gmail.com with ESMTPSA id r9-20020adfa149000000b0020e62feca05sm3252081wrr.32.2022.05.20.11.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 11:34:45 -0700 (PDT) From: Maximilian Luz To: Hans de Goede , Sebastian Reichel Cc: Maximilian Luz , Mark Gross , platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/10] power/supply: surface_battery: Use client device wrappers for notifier registration Date: Fri, 20 May 2022 20:34:17 +0200 Message-Id: <20220520183422.7185-6-luzmaximilian@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220520183422.7185-1-luzmaximilian@gmail.com> References: <20220520183422.7185-1-luzmaximilian@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Use newly introduced client device wrapper functions for notifier registration and unregistration. Signed-off-by: Maximilian Luz --- drivers/power/supply/surface_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/surface_battery.c b/drivers/power/supply/surface_battery.c index 5ec2e6bb2465..540707882bb0 100644 --- a/drivers/power/supply/surface_battery.c +++ b/drivers/power/supply/surface_battery.c @@ -802,7 +802,7 @@ static int spwr_battery_register(struct spwr_battery_device *bat) if (IS_ERR(bat->psy)) return PTR_ERR(bat->psy); - return ssam_notifier_register(bat->sdev->ctrl, &bat->notif); + return ssam_device_notifier_register(bat->sdev, &bat->notif); } @@ -837,7 +837,7 @@ static void surface_battery_remove(struct ssam_device *sdev) { struct spwr_battery_device *bat = ssam_device_get_drvdata(sdev); - ssam_notifier_unregister(sdev->ctrl, &bat->notif); + ssam_device_notifier_unregister(sdev, &bat->notif); cancel_delayed_work_sync(&bat->update_work); } -- 2.36.1