Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6081324pxb; Thu, 27 Jan 2022 06:10:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeKl1xpPo1C31hbq40nFzyGYnk2cpy0psqkadjXWOjwjebRo3kkS6j2sWHVjW+k4JjdqNu X-Received: by 2002:a17:907:97d0:: with SMTP id js16mr2922839ejc.345.1643292654328; Thu, 27 Jan 2022 06:10:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643292654; cv=none; d=google.com; s=arc-20160816; b=D3iOxZ2AtMgkj6KpGAtmnKr9wVsnia3lm3lALo/qC7LDS70MQQVei8n5iZhQYJu7SL d/1cZE8bZMFZDUtv7ZA3qaKWSyZjklktTIO3K6yGIQFNeL6rDLwBUimDfxxamj6ex3Js s/orhUvNDKbkXJCexeWpSElCqjOL+/5htqR8ibkco1Kc3XIjF9chKp4RktcXefgYy4o6 sHIFwZjcTCxNMqV7nrliAMZvH+CoNhTHt8UZTVwgqoloHl7ot3DXWU4Mls9ptjU7Xhor sJ8OtwRxcqzryXjur553bNh7xjvBgQOfe2XPrav1v0GRGCrIl4TrSkpkkdvhcjjA2xOL 5RPA== 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 :message-id:date:subject:cc:to:from; bh=NszxRCJ45O0nzR0SkA/V3TqgzTsGWJobGFECc17Mi2s=; b=gy2JM5WylUiLDViXREC7b7MaP8YDVK3/gCnaKY3B1tWcXtb0EHLVPG45Ka3OzEn9vY 86DhdXtpQn4lX8O6lWe7Vwqbh9Xieb4GBBas1FLBJT6Erlf6dGbyIKhxWC06WdhjOBYQ GfC0zNOLqXRsW1oGr111akHufU4B71B4mOYtHJgd2h3bwnpMjwVI5pG2hjGLzxiFxpWf hunGJKwngHq7hoS6RlBkbcsrDwcThrjPeRN98bGPbgyHQ2kfI5K36cbg8ECGPGM9ZFxK 8317BjrqaCJHq8mobRMPhH/+3nh9wtE4RQ88LfxrgK/AjdhwpcTN+zBy5rSRVji5/qt9 bB7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f9si1671036edf.226.2022.01.27.06.10.27; Thu, 27 Jan 2022 06:10:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237492AbiA0Hrv (ORCPT + 99 others); Thu, 27 Jan 2022 02:47:51 -0500 Received: from mailgw.kylinos.cn ([123.150.8.42]:35201 "EHLO nksmu.kylinos.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S237484AbiA0Hru (ORCPT ); Thu, 27 Jan 2022 02:47:50 -0500 X-UUID: 9c316d2c6932470e8201b3f3e6b85e66-20220127 X-CPASD-INFO: ffe746053608457fb7a2ff90aa18ca17@r7afV2FoXmVfVnKEg3iCoIJokWKWkll _o5tRaJGRXVeVhH5xTWJsXVKBfG5QZWNdYVN_eGpQYl9gZFB5i3-XblBgXoZgUZB3taifV2RkYA== X-CPASD-FEATURE: 0.0 X-CLOUD-ID: ffe746053608457fb7a2ff90aa18ca17 X-CPASD-SUMMARY: SIP:-1,APTIP:-2.0,KEY:0.0,FROMBLOCK:1,EXT:0.0,OB:0.0,URL:-5,T VAL:224.0,ESV:0.0,ECOM:-5.0,ML:0.0,FD:0.0,CUTS:98.0,IP:-2.0,MAL:0.0,ATTNUM:0. 0,PHF:-5.0,PHC:-5.0,SPF:4.0,EDMS:-3,IPLABEL:4488.0,FROMTO:0,AD:0,FFOB:0.0,CFO B:0.0,SPC:0.0,SIG:-5,AUF:106,DUF:31942,ACD:176,DCD:278,SL:0,AG:0,CFC:0.38,CFS R:0.058,UAT:0,RAF:0,VERSION:2.3.4 X-CPASD-ID: 9c316d2c6932470e8201b3f3e6b85e66-20220127 X-CPASD-BLOCK: 1000 X-CPASD-STAGE: 1, 1 X-UUID: 9c316d2c6932470e8201b3f3e6b85e66-20220127 X-User: yinxiujiang@kylinos.cn Received: from localhost.localdomain [(118.26.139.139)] by nksmu.kylinos.cn (envelope-from ) (Generic MTA) with ESMTP id 2133356184; Thu, 27 Jan 2022 16:00:26 +0800 From: Yin Xiujiang To: duncan.sands@free.fr, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, yinxiujiang@kylinos.cn Subject: [PATCH] usb: atm: Make use of the helper macro kthread_run() Date: Thu, 27 Jan 2022 15:47:44 +0800 Message-Id: <20220127074744.845537-1-yinxiujiang@kylinos.cn> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Repalce kthread_create/wake_up_process() with kthread_run() to simplify the code. Signed-off-by: Yin Xiujiang --- drivers/usb/atm/usbatm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/atm/usbatm.c b/drivers/usb/atm/usbatm.c index e3a49d837609..24ba739a85e0 100644 --- a/drivers/usb/atm/usbatm.c +++ b/drivers/usb/atm/usbatm.c @@ -976,7 +976,7 @@ static int usbatm_heavy_init(struct usbatm_data *instance) { struct task_struct *t; - t = kthread_create(usbatm_do_heavy_init, instance, "%s", + t = kthread_run(usbatm_do_heavy_init, instance, "%s", instance->driver->driver_name); if (IS_ERR(t)) { usb_err(instance, "%s: failed to create kernel_thread (%ld)!\n", @@ -985,7 +985,6 @@ static int usbatm_heavy_init(struct usbatm_data *instance) } instance->thread = t; - wake_up_process(t); wait_for_completion(&instance->thread_started); return 0; -- 2.30.0