From nobody Mon Nov 25 12:35:41 2024 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 BAE271F7576 for ; Mon, 28 Oct 2024 07:35:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100945; cv=none; b=ajFkxn3WXlXRCWywJyp6x7AOEBr83Ao64d31R1FF4AGVdvpW/8huB3Z8LV3uyu4mmonkwGtxhJzTV6ncx3/RCEta1HgUHY+aCAjBhvo7Rx1hC/krL0S3iUYZuNU6v87S2a9G9rGuur83CjVtFJNVrEbQfg0HDNZ5+h3+2fLm/sk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100945; c=relaxed/simple; bh=oDeujpoBqZWZizA02W+hknPR2VCps+F+DQ9APeuhWvs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GWnyHmZx1fKQ74wPQVFAYwkqJqQVOTQVrRHU7tXTYq1E08BRagYRRD42/qSfXLheQsAJYVI51bgdAI2/FikipdjzYT/fpi8w704iCFH3lMs/e9TcVYaK2k03srMkRAeEh58pMozGjeUzgsM8qSxDK60OVNErd6PjouMjqxMD/AE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WtW31ZX9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=1zInMeUx; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="WtW31ZX9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1zInMeUx" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=75QZv1QektY+iXyS9vVN8n9LCzJqE7Lsc4cQ8j41z4E=; b=WtW31ZX9VzBnBjqla2slWXAsaKpXT1RJ3LXiEtZ8anOYXQjPQzMfYqaD2AUV2pX0C/D6OE DqvxPH4dJe7tg7hRtvh292aSA6njAVLKrNdLy0/Ptje7g4Y+K7pgaGwp1/V0H8W2m/46Fk SGAjTCw9y2DnuCexafeBoB/dulU1QZ+KIkbGxhSC17VFg041r9SKZ7Q3mLTVAwNQgXMpW4 Npi+fN5PAURzDrcTg3U/2Mx6EceK/ncEuNaZrIqZPD1yRuGxc5WtXnalVMEcd2MVuuYeBW Csrc2m9FbWxby6i+TaieWV227F2jjsrHuW9SC1wla6XASoAUbdWt4MJN6iYXkw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=75QZv1QektY+iXyS9vVN8n9LCzJqE7Lsc4cQ8j41z4E=; b=1zInMeUxCBLvFo4XC6I56e8euEGAnwZLSkRQ465mr9VDjbYF/qQSVE94H4QBNeYiG1DX/I saBI/ou6QMEDl/BQ== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Pavel Machek Subject: [PATCH 24/44] leds: trigger: pattern: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:00 +0100 Message-Id: <9e97d867e4a289cd3c7aa081302d439e656f138b.1729865485.git.namcao@linutronix.de> In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao --- Cc: Pavel Machek --- drivers/leds/trigger/ledtrig-pattern.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/leds/trigger/ledtrig-pattern.c b/drivers/leds/trigger/= ledtrig-pattern.c index aad48c2540fc..a594bd5e2233 100644 --- a/drivers/leds/trigger/ledtrig-pattern.c +++ b/drivers/leds/trigger/ledtrig-pattern.c @@ -483,8 +483,8 @@ static int pattern_trig_activate(struct led_classdev *l= ed_cdev) data->led_cdev =3D led_cdev; led_set_trigger_data(led_cdev, data); timer_setup(&data->timer, pattern_trig_timer_function, 0); - hrtimer_init(&data->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - data->hrtimer.function =3D pattern_trig_hrtimer_function; + hrtimer_setup(&data->hrtimer, pattern_trig_hrtimer_function, CLOCK_MONOTO= NIC, + HRTIMER_MODE_REL); led_cdev->activated =3D true; =20 if (led_cdev->flags & LED_INIT_DEFAULT_TRIGGER) { --=20 2.39.5