From nobody Thu Apr 2 10:07:32 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F7BDC04A95 for ; Mon, 26 Sep 2022 01:27:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232566AbiIZB1U (ORCPT ); Sun, 25 Sep 2022 21:27:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbiIZB1P (ORCPT ); Sun, 25 Sep 2022 21:27:15 -0400 Received: from unicom145.biz-email.net (unicom145.biz-email.net [210.51.26.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8B5428701 for ; Sun, 25 Sep 2022 18:27:14 -0700 (PDT) Received: from ([60.208.111.195]) by unicom145.biz-email.net ((D)) with ASMTP (SSL) id UAB00112; Mon, 26 Sep 2022 09:27:12 +0800 Received: from localhost.localdomain (10.200.104.97) by jtjnmail201612.home.langchao.com (10.100.2.12) with Microsoft SMTP Server id 15.1.2507.12; Mon, 26 Sep 2022 09:27:11 +0800 From: Bo Liu To: CC: , Bo Liu Subject: [PATCH] mux: Remove usage of the deprecated ida_simple_xxx API Date: Sun, 25 Sep 2022 21:27:08 -0400 Message-ID: <20220926012708.3265-1-liubo03@inspur.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Originating-IP: [10.200.104.97] tUid: 2022926092712ae41cec4066e4e3f6cf381ec32031138 X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use ida_alloc()/ida_free() instead of ida_simple_get()/ida_simple_remove(). The latter is deprecated and more verbose. Signed-off-by: Bo Liu --- drivers/mux/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mux/core.c b/drivers/mux/core.c index 49bedbe6316c..0f5c76109bb6 100644 --- a/drivers/mux/core.c +++ b/drivers/mux/core.c @@ -66,7 +66,7 @@ static void mux_chip_release(struct device *dev) { struct mux_chip *mux_chip =3D to_mux_chip(dev); =20 - ida_simple_remove(&mux_ida, mux_chip->id); + ida_free(&mux_ida, mux_chip->id); kfree(mux_chip); } =20 @@ -113,7 +113,7 @@ struct mux_chip *mux_chip_alloc(struct device *dev, mux_chip->dev.of_node =3D dev->of_node; dev_set_drvdata(&mux_chip->dev, mux_chip); =20 - mux_chip->id =3D ida_simple_get(&mux_ida, 0, 0, GFP_KERNEL); + mux_chip->id =3D ida_alloc(&mux_ida, GFP_KERNEL); if (mux_chip->id < 0) { int err =3D mux_chip->id; =20 --=20 2.27.0