From patchwork Tue Feb 21 05:00:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Logan Gunthorpe X-Patchwork-Id: 733075 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vXC672W4Mz9sDC for ; Tue, 28 Feb 2017 06:52:15 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1ciRL8-0003Ad-Id; Mon, 27 Feb 2017 19:52:10 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1cg3F1-0001h1-LR for tpmdd-devel@lists.sourceforge.net; Tue, 21 Feb 2017 05:43:59 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of deltatee.com designates 207.54.116.67 as permitted sender) client-ip=207.54.116.67; envelope-from=gunthorp@deltatee.com; helo=ale.deltatee.com; Received: from ale.deltatee.com ([207.54.116.67]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) id 1cg3F0-00047x-FV for tpmdd-devel@lists.sourceforge.net; Tue, 21 Feb 2017 05:43:59 +0000 Received: from cgy1-donard.priv.deltatee.com ([172.16.1.31] helo=cgy1-donard.pmc-sierra.internal) by ale.deltatee.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1cg2Zi-0005ux-99; Mon, 20 Feb 2017 22:01:20 -0700 Received: from gunthorp by cgy1-donard.pmc-sierra.internal with local (Exim 4.84_2) (envelope-from ) id 1cg2ZV-00030W-Fi; Mon, 20 Feb 2017 22:01:05 -0700 From: Logan Gunthorpe To: Greg Kroah-Hartman , Dan Williams , Alexander Viro , Johannes Thumshirn , Jan Kara , Arnd Bergmann , Sajjan Vikas C , Dmitry Torokhov , Linus Walleij , Alexandre Courbot , Peter Huewe , Marcel Selhorst , Jarkko Sakkinen , Jason Gunthorpe , Olof Johansson , Doug Ledford , Sean Hefty , Hal Rosenstock , Dmitry Vyukov , Haggai Eran , Parav Pandit , Leon Romanovsky , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Hans Verkuil , Mauro Carvalho Chehab , Artem Bityutskiy , Richard Weinberger , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Cyrille Pitchen , Matt Porter , Alexandre Bounine , Andrew Morton , Joe Perches , Lorenzo Stoakes , Vladimir Zapolskiy , Alessandro Zummo , Alexandre Belloni , Boaz Harrosh , Benny Halevy , "James E.J. Bottomley" , "Martin K. Petersen" , Stephen Bates , Bjorn Helgaas Date: Mon, 20 Feb 2017 22:00:42 -0700 Message-Id: <1487653253-11497-4-git-send-email-logang@deltatee.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1487653253-11497-1-git-send-email-logang@deltatee.com> References: <1487653253-11497-1-git-send-email-logang@deltatee.com> X-SA-Exim-Connect-IP: 172.16.1.31 X-SA-Exim-Rcpt-To: gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk, jthumshirn@suse.de, jack@suse.cz, arnd@arndb.de, vikas.cha.sajjan@hpe.com, linus.walleij@linaro.org, tpmdd@selhorst.net, jarkko.sakkinen@linux.intel.com, jgunthorpe@obsidianresearch.com, olof@lixom.net, dledford@redhat.com, dan.j.williams@intel.com, sean.hefty@intel.com, haggaie@mellanox.com, peterhuewe@gmx.de, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, hans.verkuil@cisco.com, leon@kernel.org, jic23@kernel.org, mchehab@kernel.org, richard@nod.at, dwmw2@infradead.org, cyrille.pitchen@atmel.com, mporter@kernel.crashing.org, alexandre.bounine@idt.com, akpm@linux-foundation.org, joe@perches.com, dmitry.torokhov@gmail.com, gnurou@gmail.com, hal.rosenstock@gmail.com, pandit.parav@gmail.com, dedekind1@gmail.com, computersforpeace@gmail.com, marek.vasut@gmail.com, lstoakes@gmail.com, vz@mleia.com, a.zummo@towertech.it, boris.brezillon@free-electrons.com, alexandre.belloni@free-electrons.com, ooo@electrozaur.com, bhalevy@primarydata.com, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, stephen.bates@microsemi.com, dvyukov@google.com, bhelgaas@google.com, osd-dev@open-osd.org, rtc-linux@googlegroups.com, linux-mtd@lists.infradead.org, tpmdd-devel@lists.sourceforge.net, linux-nvdimm@lists.01.org, linux-pci@vger.kernel.org, linux-scsi@vger.kernel.org, linux-media@vger.kernel.org, linux-iio@vger.kernel.org, linux-rdma@vger.kernel.org, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, logang@deltatee.com X-SA-Exim-Mail-From: gunthorp@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-6.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, MYRULES_FREE, MYRULES_NO_TEXT, RP_MATCHES_RCVD autolearn=no autolearn_force=no version=3.4.0 X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1cg3F0-00047x-FV X-Mailman-Approved-At: Mon, 27 Feb 2017 19:52:05 +0000 Cc: linux-scsi@vger.kernel.org, rtc-linux@googlegroups.com, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, osd-dev@open-osd.org, linux-input@vger.kernel.org, linux-fsdevel@vger.kernel.org, Logan Gunthorpe , linux-media@vger.kernel.org Subject: [tpmdd-devel] [PATCH 03/14] input: utilize new device_add_cdev helper function X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: tpmdd-devel-bounces@lists.sourceforge.net Signed-off-by: Logan Gunthorpe --- drivers/input/evdev.c | 3 +-- drivers/input/joydev.c | 3 +-- drivers/input/mousedev.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index e9ae3d5..a3407ea 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -1416,8 +1416,7 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev, goto err_free_evdev; cdev_init(&evdev->cdev, &evdev_fops); - evdev->cdev.kobj.parent = &evdev->dev.kobj; - error = cdev_add(&evdev->cdev, evdev->dev.devt, 1); + error = device_add_cdev(&evdev->dev, &evdev->cdev); if (error) goto err_unregister_handle; diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index abd18f3..012e06f 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c @@ -905,8 +905,7 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev, goto err_free_joydev; cdev_init(&joydev->cdev, &joydev_fops); - joydev->cdev.kobj.parent = &joydev->dev.kobj; - error = cdev_add(&joydev->cdev, joydev->dev.devt, 1); + error = device_add_cdev(&joydev->dev, &joydev->cdev); if (error) goto err_unregister_handle; diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index b604564..efd8666 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -901,8 +901,7 @@ static struct mousedev *mousedev_create(struct input_dev *dev, } cdev_init(&mousedev->cdev, &mousedev_fops); - mousedev->cdev.kobj.parent = &mousedev->dev.kobj; - error = cdev_add(&mousedev->cdev, mousedev->dev.devt, 1); + error = device_add_cdev(&mousedev->dev, &mousedev->cdev); if (error) goto err_unregister_handle;