Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp402602pxb; Thu, 21 Oct 2021 01:41:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPVEN4zF0sgIxH1rKvgrJdwt0eLCkHj1PdZlPnp2hsCBJbrhoWsr/ebQsWPqujvwA/cgWB X-Received: by 2002:a17:90a:d48e:: with SMTP id s14mr5267759pju.49.1634805666439; Thu, 21 Oct 2021 01:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634805666; cv=none; d=google.com; s=arc-20160816; b=wLOGVkSSait/4d4bkVXuG6rAvaxV82XxGRXxQXQEF+SRhBgnMB8hBKElV6Qlr8fvOJ sPynP2vfGWzgLoEVCiYavdk80qTnuK33/zS8uEP1c9YLy7Ep3VpJ6408J8uMN3J1UzK5 qQ1GfIR2SbOqyAVzZlYXIESsDcg9U0FjaROS/Opar9eC9Ge56b37x+GtiCwJ8tlCWO6w tErIPwJoWW39SHGywASHBEjAiPlPLvUCPN5YqpavdqU/QG2T67EciOp4hPpCehR2D9h+ NM5ubMmKRiCoA38iqSnFtHHiEs+J4KcSsOgGSlWdc/mNOqYxlxGsN3q+3ZclO60lxwXW nDUw== 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=X53pf7PPm/0HdHn+XijS4raBZQQTWMNLCqPQnHglxa4=; b=wd8zKMasEZylOTxtFkH15jH/q02UL2HG+PsGt2hlqhGovlE8+++8of4DeV4RPwTNlo wy4k7bSxI+ZPEZflhxzwrVx8YuXWXj4TKh1rJjZUURVzA0Nu+n8CjHKvgHHGs6XcvKvQ FUAKxLGIRdvRlQ5aR8E90FwoQYdz97SNaQ1jYdL3pKP69GMXXUKrIcPWOsJWLfJcJyMP HRs1/QF39g7rU6J7XCVsyAK0LYtJuRQ4dtfC83Tl8zxB2CoUJGirwg9z0wYJTgHa2Utu f26QhEyHSxFNbixvu7jB9DxqMLuAriIvJSKGgP/OdV05AwnjXjPWkaY0nlo9dDfJR0Fp V2zQ== 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 x5si5945389pjc.79.2021.10.21.01.40.53; Thu, 21 Oct 2021 01:41:06 -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 S231391AbhJUIlL (ORCPT + 99 others); Thu, 21 Oct 2021 04:41:11 -0400 Received: from mx22.baidu.com ([220.181.50.185]:42768 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231268AbhJUIlL (ORCPT ); Thu, 21 Oct 2021 04:41:11 -0400 Received: from BJHW-Mail-Ex10.internal.baidu.com (unknown [10.127.64.33]) by Forcepoint Email with ESMTPS id 4D4E791DD0458F9458B8; Thu, 21 Oct 2021 16:38:49 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex10.internal.baidu.com (10.127.64.33) 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:38:49 +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:38:48 +0800 From: Cai Huoqing To: CC: Jiri Kosina , Arnd Bergmann , "Greg Kroah-Hartman" , Subject: [PATCH] apm-emulation: Make use of the helper macro kthread_run() Date: Thu, 21 Oct 2021 16:38:46 +0800 Message-ID: <20211021083847.1812-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) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex10_2021-10-21 16:38:49:274 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/char/apm-emulation.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/apm-emulation.c b/drivers/char/apm-emulation.c index 230cf852fa9c..c18cdf4ecfd8 100644 --- a/drivers/char/apm-emulation.c +++ b/drivers/char/apm-emulation.c @@ -636,13 +636,12 @@ static int __init apm_init(void) return -ENODEV; } - kapmd_tsk = kthread_create(kapmd, NULL, "kapmd"); + kapmd_tsk = kthread_run(kapmd, NULL, "kapmd"); if (IS_ERR(kapmd_tsk)) { ret = PTR_ERR(kapmd_tsk); kapmd_tsk = NULL; goto out; } - wake_up_process(kapmd_tsk); #ifdef CONFIG_PROC_FS proc_create_single("apm", 0, NULL, proc_apm_show); -- 2.25.1