Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp404448pxb; Thu, 21 Oct 2021 01:43:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXjERv24AAStoiG9dmQQGDLKhdZoUVokRvbFlyCMklbvPHKmIk8Ha2UUj8bMCqYBngTh/y X-Received: by 2002:a17:90b:1e01:: with SMTP id pg1mr5003662pjb.81.1634805836205; Thu, 21 Oct 2021 01:43:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634805836; cv=none; d=google.com; s=arc-20160816; b=yaIvgh/Ga9JVTk2TuZ3DWte7bE6TfHPtIyw7gHGcc2LjD/QBpoos29Hgtfc1OIsCo7 cZsGFi3HfogCsuiD12fr5So3GhwSUQNyNtdVa6/4JAACDwMxgJ1Tb9LhlxBFDzEYW3FP +q2JkDbtDSlI8SSIPaDU3gZXIiy/bOmBnPc6F9vM3mSc3pns9K84OzI9T6uBTu64EzBb n0p1fJQEXZtREjvEx75u2UNUB6l0nMW2dV/blkNoPt2fnutIn38ky4aI2kswjmsFUskb xTPm6SjjvLIbt8MJPMFlx9k+acS5PZzmHTJpRCuVJx4qNFi1g6A6xrUPpz0K6HKxzi3q yXFQ== 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=XFcXMSicm9c7XBaPMAxJIT3rHb0FGOVACbiy32JYLRw=; b=aYD4Cm2kUh+K9HBTY5ubD+NgDIBmHECvsCkSmdqTVc+YStlcUhLutlxwAdWUQozgQ5 BQRiAX6o5qj7CCooH/LEBlXOoBqR4xLMCbIIbcrqHJWrXkcDKBvtRkvsXvOtvj/nWEzi Pk/gNLJ4t8+gxTLnywF/2U1TicrGlXdOhmZUCA3DnCJp8zm+vxUPl9I97meUuksHpO9f ddmjzl0boDsNttfifsDm1TCUILZDMov2+udWHJqNyeMB/jRyxYSk56rMh6G2jqQOQYXX 8PY/oweDUeFYlIqd6C1sYNIgC2A3ZEHm/5+PsZrGtE/deNAWrr6XvBKs/Qt3kS9odzaz CtjQ== 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 13si6023434pgb.551.2021.10.21.01.43.41; Thu, 21 Oct 2021 01:43:56 -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 S231336AbhJUIoD (ORCPT + 99 others); Thu, 21 Oct 2021 04:44:03 -0400 Received: from mx22.baidu.com ([220.181.50.185]:45266 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230385AbhJUIoC (ORCPT ); Thu, 21 Oct 2021 04:44:02 -0400 Received: from Bc-Mail-Ex13.internal.baidu.com (unknown [172.31.51.53]) by Forcepoint Email with ESMTPS id 1C23AAFA70FCA94044F1; Thu, 21 Oct 2021 16:41:45 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by Bc-Mail-Ex13.internal.baidu.com (172.31.51.53) 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:41:44 +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:41:44 +0800 From: Cai Huoqing To: CC: Erik Andren , Hans Verkuil , Mauro Carvalho Chehab , , Subject: [PATCH] media: gspca: Make use of the helper macro kthread_run() Date: Thu, 21 Oct 2021 16:41:42 +0800 Message-ID: <20211021084143.2077-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/media/usb/gspca/m5602/m5602_s5k83a.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c index bc4008d5d116..4504d615b1e4 100644 --- a/drivers/media/usb/gspca/m5602/m5602_s5k83a.c +++ b/drivers/media/usb/gspca/m5602/m5602_s5k83a.c @@ -339,14 +339,13 @@ int s5k83a_start(struct sd *sd) /* Create another thread, polling the GPIO ports of the camera to check if it got rotated. This is how the windows driver does it so we have to assume that there is no better way of accomplishing this */ - sd->rotation_thread = kthread_create(rotation_thread_function, - sd, "rotation thread"); + sd->rotation_thread = kthread_run(rotation_thread_function, + sd, "rotation thread"); if (IS_ERR(sd->rotation_thread)) { err = PTR_ERR(sd->rotation_thread); sd->rotation_thread = NULL; return err; } - wake_up_process(sd->rotation_thread); /* Preinit the sensor */ for (i = 0; i < ARRAY_SIZE(start_s5k83a) && !err; i++) { -- 2.25.1