Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp407171pxb; Thu, 21 Oct 2021 01:48:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxim31HGkIqZvlF8hDkzWx10jW/qoITP8gj5gmq39l3ILM+LjrGiG04mKeyBat3SAcD98RA X-Received: by 2002:aa7:d792:: with SMTP id s18mr499000edq.145.1634806096993; Thu, 21 Oct 2021 01:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634806096; cv=none; d=google.com; s=arc-20160816; b=TypSZwjHVWt22InfpM0OisRDzylUaqq1zT+1/MJAUaLsgeKNYiSq2UmQpU6KyBD2Fw dTwJ06MjY5VvV0Zek1LCvBLoAQic0l8AtauVXIIKna5fLb2kZXqAFuI3LQOGz+IxvlDj 9rwPNE+Pm9EqiUPaLCS2DZzMxRamNvfcq0DjA+IXd5wHU2yI/OL7XLh8njynFl8W19iy INE/+hfBq7dW9tsn/yf/NZSobI34rzB/h+wFEwY6kZiWuDs21l5FaHTaAE2SeYmu4hm/ qsVNdWUwl6TXe4yGl9iivPbiK6nCpD2H5nXOXfHlPDriyTdlrAdQSJO8E1jxqhwbPsA/ d5Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=4c/xDvNFkM3geRsA2JERM0R0ZEmhAF+YJ7BNsPeVCns=; b=myLxj+rbKs9fEJDqfgvecCAIR8d4wXmxnXMWLwp/PbpjLWkZXemrBMD5sIPMgb9ySU k6R+sbyekxmTtw55ecQ/N4Jn4MYwo8Qyton3UUJGU4437L0tA+tWrvK6D+7PQc5JwjBV +FAERffGcCJG6tI45GBWtCAVYbofQecDKKJn+qNlZFy93NgaNnVkjo1Trx/qenJa92y6 iAZXKHvKirEs1jcYd+S9TLkkOhxr43MbDowHWhYq3O7bwyxVZJQ4Pb9txb/bZ+PyF1jf uiY2XkRdhztyQKEEeGJAYNwTgPN4SNGWFA+g8fklA08Z9ecc8hrlofO2yVKVJ0dS5OCn 7bhA== 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 i11si8488739edb.538.2021.10.21.01.47.53; Thu, 21 Oct 2021 01:48:16 -0700 (PDT) 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 S231524AbhJUIqO (ORCPT + 99 others); Thu, 21 Oct 2021 04:46:14 -0400 Received: from mx24.baidu.com ([111.206.215.185]:47652 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231561AbhJUIqK (ORCPT ); Thu, 21 Oct 2021 04:46:10 -0400 Received: from BC-Mail-EX04.internal.baidu.com (unknown [172.31.51.44]) by Forcepoint Email with ESMTPS id B277EC2A5274A7187680; Thu, 21 Oct 2021 16:43:53 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-EX04.internal.baidu.com (172.31.51.44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Thu, 21 Oct 2021 16:43:53 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 21 Oct 2021 16:43:53 +0800 From: Cai Huoqing To: CC: Duncan Sands , Greg Kroah-Hartman , , Subject: [PATCH] usb: atm: Make use of the helper macro kthread_run() Date: Thu, 21 Oct 2021 16:43:50 +0800 Message-ID: <20211021084351.2554-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-EX02.internal.baidu.com (172.31.51.42) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) 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: Cai Huoqing --- 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 da17be1ef64e..b1ea3c6384f9 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.25.1