Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752439AbZCNEBt (ORCPT ); Sat, 14 Mar 2009 00:01:49 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750716AbZCNEBk (ORCPT ); Sat, 14 Mar 2009 00:01:40 -0400 Received: from rv-out-0506.google.com ([209.85.198.232]:2223 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750707AbZCNEBj (ORCPT ); Sat, 14 Mar 2009 00:01:39 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=Bx17pQq2I+4GSv4XiWuztwtv86oldelGCtCWcJsPckmBhov0+ma1LnV8jyNMGT6tp2 1X63vb6EDiYsxl2U4hyP7UIdaDYWyGf7jGA0lLUSFqJRssdrGSl7F83Evr54TEdI0Oag jXg8RYvyCYBfX2ShvhxrBg9VqYJasVqyQH8L0= MIME-Version: 1.0 Date: Sat, 14 Mar 2009 12:01:37 +0800 Message-ID: <804dabb00903132101o6bf812c1r1efd02d069b5c7fa@mail.gmail.com> Subject: [PATCH] replace kernel_thread() with kthread_run() in RT2870 From: Peter Teoh To: LKML Cc: Greg KH , Paul Lin Content-Type: multipart/mixed; boundary=000e0cd147f21d821804650c46ea Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5856 Lines: 96 --000e0cd147f21d821804650c46ea Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit As advised by Greg KH: http://lkml.org/lkml/2009/3/13/131 Replaced the usage of kernel_thread() with kthread_run(). Compiled successfully, but not tested as I don't have the hardware. (parsed by scripts/checkpatch.pl as well). Thanks. -- Regards, Peter Teoh --000e0cd147f21d821804650c46ea Content-Type: text/x-diff; charset=US-ASCII; name="rt2870_kernel_thread.patch" Content-Disposition: attachment; filename="rt2870_kernel_thread.patch" Content-Transfer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J4LCAw KTsKLQlpZiAocmV0dmFsIDwgMCkgeworCXRzayA9IGt0aHJlYWRfcnVuKHVzYmlwX3RocmVhZCwg KHZvaWQgKikmdWQtPnRjcF9yeCwgInVzYmlwX3RjcF9yeCIpOworCWlmIChJU19FUlIodHNrKSA8 IDApIHsKIAkJcHJpbnRrKEtFUk5fRVJSICJDcmVhdGluZyB0Y3BfcnggdGhyZWFkIGZvciB1ZCAl cCBmYWlsZWQuXG4iLAogCQkJCXVkKTsKIAkJcmV0dXJuOwogCX0KLQlyZXR2YWwgPSBrZXJuZWxf dGhyZWFkKHVzYmlwX3RocmVhZCwgKHZvaWQgKikmdWQtPnRjcF90eCwgMCk7Ci0JaWYgKHJldHZh bCA8IDApIHsKKwl0c2sgPSBrdGhyZWFkX3J1bih1c2JpcF90aHJlYWQsICh2b2lkICopJnVkLT50 Y3BfdHgsICJ1c2JpcF90Y3BfdHgiKTsKKwlpZiAoSVNfRVJSKHRzaykgPCAwKSB7CiAJCXByaW50 ayhLRVJOX0VSUiAiQ3JlYXRpbmcgdGNwX3R4IHRocmVhZCBmb3IgdWQgJXAgZmFpbGVkLlxuIiwK IAkJCQl1ZCk7CiAJCXJldHVybjsK --000e0cd147f21d821804650c46ea-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/