From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH 13/14] scsi: utilize new device_add_cdev helper function Date: Tue, 21 Feb 2017 14:52:00 +0200 Message-ID: References: <1487653253-11497-1-git-send-email-logang@deltatee.com> <1487653253-11497-14-git-send-email-logang@deltatee.com> Reply-To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Sender: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <1487653253-11497-14-git-send-email-logang-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Logan Gunthorpe , 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 Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, osd-dev-yNzVSZO3znNg9hUCZPvPmw@public.gmane.org, linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-gpio@vger.kernel.org On 02/21/2017 07:00 AM, Logan Gunthorpe wrote: > Note: the chardev instance in osd_uld.c originally did not > set the kobject parent. Thus, I'm reasonably confident that because > of this, this code would have suffered from a minor use after free > bug if the cdev was open when the backing device was released. > > Signed-off-by: Logan Gunthorpe Cool thanks. And even a bug fix ACK-by: Boaz Harrosh > --- > drivers/scsi/osd/osd_uld.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c > index 243eab3..519be56 100644 > --- a/drivers/scsi/osd/osd_uld.c > +++ b/drivers/scsi/osd/osd_uld.c > @@ -473,18 +473,19 @@ static int osd_probe(struct device *dev) > goto err_put_disk; > } > > + device_initialize(&oud->class_dev); > + oud->class_dev.devt = MKDEV(SCSI_OSD_MAJOR, oud->minor); > + > /* init the char-device for communication with user-mode */ > cdev_init(&oud->cdev, &osd_fops); > oud->cdev.owner = THIS_MODULE; > - error = cdev_add(&oud->cdev, > - MKDEV(SCSI_OSD_MAJOR, oud->minor), 1); > + error = device_add_cdev(&oud->class_dev, &oud->cdev); > if (error) { > OSD_ERR("cdev_add failed\n"); > goto err_put_disk; > } > > /* class device member */ > - oud->class_dev.devt = oud->cdev.dev; > oud->class_dev.class = &osd_uld_class; > oud->class_dev.parent = dev; > oud->class_dev.release = __remove; > @@ -494,7 +495,7 @@ static int osd_probe(struct device *dev) > goto err_put_cdev; > } > > - error = device_register(&oud->class_dev); > + error = device_add(&oud->class_dev); > if (error) { > OSD_ERR("device_register failed => %d\n", error); > goto err_put_cdev; > -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0C2E182218 for ; Tue, 21 Feb 2017 04:52:10 -0800 (PST) Received: by mail-wr0-f194.google.com with SMTP id s27so5969466wrb.0 for ; Tue, 21 Feb 2017 04:52:09 -0800 (PST) Subject: Re: [PATCH 13/14] scsi: utilize new device_add_cdev helper function References: <1487653253-11497-1-git-send-email-logang@deltatee.com> <1487653253-11497-14-git-send-email-logang@deltatee.com> From: Boaz Harrosh Message-ID: Date: Tue, 21 Feb 2017 14:52:00 +0200 MIME-Version: 1.0 In-Reply-To: <1487653253-11497-14-git-send-email-logang@deltatee.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Logan Gunthorpe , 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 Cc: linux-scsi@vger.kernel.org, rtc-linux@googlegroups.com, linux-nvdimm@lists.01.org, linux-iio@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@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, linux-media@vger.kernel.org, linux-rdma@vger.kernel.org List-ID: On 02/21/2017 07:00 AM, Logan Gunthorpe wrote: > Note: the chardev instance in osd_uld.c originally did not > set the kobject parent. Thus, I'm reasonably confident that because > of this, this code would have suffered from a minor use after free > bug if the cdev was open when the backing device was released. > > Signed-off-by: Logan Gunthorpe Cool thanks. And even a bug fix ACK-by: Boaz Harrosh > --- > drivers/scsi/osd/osd_uld.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c > index 243eab3..519be56 100644 > --- a/drivers/scsi/osd/osd_uld.c > +++ b/drivers/scsi/osd/osd_uld.c > @@ -473,18 +473,19 @@ static int osd_probe(struct device *dev) > goto err_put_disk; > } > > + device_initialize(&oud->class_dev); > + oud->class_dev.devt = MKDEV(SCSI_OSD_MAJOR, oud->minor); > + > /* init the char-device for communication with user-mode */ > cdev_init(&oud->cdev, &osd_fops); > oud->cdev.owner = THIS_MODULE; > - error = cdev_add(&oud->cdev, > - MKDEV(SCSI_OSD_MAJOR, oud->minor), 1); > + error = device_add_cdev(&oud->class_dev, &oud->cdev); > if (error) { > OSD_ERR("cdev_add failed\n"); > goto err_put_disk; > } > > /* class device member */ > - oud->class_dev.devt = oud->cdev.dev; > oud->class_dev.class = &osd_uld_class; > oud->class_dev.parent = dev; > oud->class_dev.release = __remove; > @@ -494,7 +495,7 @@ static int osd_probe(struct device *dev) > goto err_put_cdev; > } > > - error = device_register(&oud->class_dev); > + error = device_add(&oud->class_dev); > if (error) { > OSD_ERR("device_register failed => %d\n", error); > goto err_put_cdev; > _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr0-f196.google.com ([209.85.128.196]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cg9vi-0002Cl-6A for linux-mtd@lists.infradead.org; Tue, 21 Feb 2017 12:52:32 +0000 Received: by mail-wr0-f196.google.com with SMTP id z61so14341572wrc.3 for ; Tue, 21 Feb 2017 04:52:09 -0800 (PST) Subject: Re: [PATCH 13/14] scsi: utilize new device_add_cdev helper function To: Logan Gunthorpe , 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 References: <1487653253-11497-1-git-send-email-logang@deltatee.com> <1487653253-11497-14-git-send-email-logang@deltatee.com> 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, linux-media@vger.kernel.org From: Boaz Harrosh Message-ID: Date: Tue, 21 Feb 2017 14:52:00 +0200 MIME-Version: 1.0 In-Reply-To: <1487653253-11497-14-git-send-email-logang@deltatee.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 02/21/2017 07:00 AM, Logan Gunthorpe wrote: > Note: the chardev instance in osd_uld.c originally did not > set the kobject parent. Thus, I'm reasonably confident that because > of this, this code would have suffered from a minor use after free > bug if the cdev was open when the backing device was released. > > Signed-off-by: Logan Gunthorpe Cool thanks. And even a bug fix ACK-by: Boaz Harrosh > --- > drivers/scsi/osd/osd_uld.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c > index 243eab3..519be56 100644 > --- a/drivers/scsi/osd/osd_uld.c > +++ b/drivers/scsi/osd/osd_uld.c > @@ -473,18 +473,19 @@ static int osd_probe(struct device *dev) > goto err_put_disk; > } > > + device_initialize(&oud->class_dev); > + oud->class_dev.devt = MKDEV(SCSI_OSD_MAJOR, oud->minor); > + > /* init the char-device for communication with user-mode */ > cdev_init(&oud->cdev, &osd_fops); > oud->cdev.owner = THIS_MODULE; > - error = cdev_add(&oud->cdev, > - MKDEV(SCSI_OSD_MAJOR, oud->minor), 1); > + error = device_add_cdev(&oud->class_dev, &oud->cdev); > if (error) { > OSD_ERR("cdev_add failed\n"); > goto err_put_disk; > } > > /* class device member */ > - oud->class_dev.devt = oud->cdev.dev; > oud->class_dev.class = &osd_uld_class; > oud->class_dev.parent = dev; > oud->class_dev.release = __remove; > @@ -494,7 +495,7 @@ static int osd_probe(struct device *dev) > goto err_put_cdev; > } > > - error = device_register(&oud->class_dev); > + error = device_add(&oud->class_dev); > if (error) { > OSD_ERR("device_register failed => %d\n", error); > goto err_put_cdev; > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: rtc-linux@googlegroups.com Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com. [209.85.128.195]) by gmr-mx.google.com with ESMTPS id p185si1126280wme.1.2017.02.21.04.52.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Feb 2017 04:52:08 -0800 (PST) Received: by mail-wr0-f195.google.com with SMTP id s27so5969447wrb.0 for ; Tue, 21 Feb 2017 04:52:08 -0800 (PST) Subject: [rtc-linux] Re: [PATCH 13/14] scsi: utilize new device_add_cdev helper function To: Logan Gunthorpe , 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 References: <1487653253-11497-1-git-send-email-logang@deltatee.com> <1487653253-11497-14-git-send-email-logang@deltatee.com> 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, linux-media@vger.kernel.org From: Boaz Harrosh Message-ID: Date: Tue, 21 Feb 2017 14:52:00 +0200 MIME-Version: 1.0 In-Reply-To: <1487653253-11497-14-git-send-email-logang@deltatee.com> Content-Type: text/plain; charset=UTF-8 Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , On 02/21/2017 07:00 AM, Logan Gunthorpe wrote: > Note: the chardev instance in osd_uld.c originally did not > set the kobject parent. Thus, I'm reasonably confident that because > of this, this code would have suffered from a minor use after free > bug if the cdev was open when the backing device was released. > > Signed-off-by: Logan Gunthorpe Cool thanks. And even a bug fix ACK-by: Boaz Harrosh > --- > drivers/scsi/osd/osd_uld.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c > index 243eab3..519be56 100644 > --- a/drivers/scsi/osd/osd_uld.c > +++ b/drivers/scsi/osd/osd_uld.c > @@ -473,18 +473,19 @@ static int osd_probe(struct device *dev) > goto err_put_disk; > } > > + device_initialize(&oud->class_dev); > + oud->class_dev.devt = MKDEV(SCSI_OSD_MAJOR, oud->minor); > + > /* init the char-device for communication with user-mode */ > cdev_init(&oud->cdev, &osd_fops); > oud->cdev.owner = THIS_MODULE; > - error = cdev_add(&oud->cdev, > - MKDEV(SCSI_OSD_MAJOR, oud->minor), 1); > + error = device_add_cdev(&oud->class_dev, &oud->cdev); > if (error) { > OSD_ERR("cdev_add failed\n"); > goto err_put_disk; > } > > /* class device member */ > - oud->class_dev.devt = oud->cdev.dev; > oud->class_dev.class = &osd_uld_class; > oud->class_dev.parent = dev; > oud->class_dev.release = __remove; > @@ -494,7 +495,7 @@ static int osd_probe(struct device *dev) > goto err_put_cdev; > } > > - error = device_register(&oud->class_dev); > + error = device_add(&oud->class_dev); > if (error) { > OSD_ERR("device_register failed => %d\n", error); > goto err_put_cdev; > -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: [PATCH 13/14] scsi: utilize new device_add_cdev helper function Date: Tue, 21 Feb 2017 14:52:00 +0200 Message-ID: References: <1487653253-11497-1-git-send-email-logang@deltatee.com> <1487653253-11497-14-git-send-email-logang@deltatee.com> Reply-To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, osd-dev-yNzVSZO3znNg9hUCZPvPmw@public.gmane.org, linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Logan Gunthorpe , 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 Romanovs Return-path: Sender: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <1487653253-11497-14-git-send-email-logang-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , List-Id: linux-fsdevel.vger.kernel.org On 02/21/2017 07:00 AM, Logan Gunthorpe wrote: > Note: the chardev instance in osd_uld.c originally did not > set the kobject parent. Thus, I'm reasonably confident that because > of this, this code would have suffered from a minor use after free > bug if the cdev was open when the backing device was released. > > Signed-off-by: Logan Gunthorpe Cool thanks. And even a bug fix ACK-by: Boaz Harrosh > --- > drivers/scsi/osd/osd_uld.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c > index 243eab3..519be56 100644 > --- a/drivers/scsi/osd/osd_uld.c > +++ b/drivers/scsi/osd/osd_uld.c > @@ -473,18 +473,19 @@ static int osd_probe(struct device *dev) > goto err_put_disk; > } > > + device_initialize(&oud->class_dev); > + oud->class_dev.devt = MKDEV(SCSI_OSD_MAJOR, oud->minor); > + > /* init the char-device for communication with user-mode */ > cdev_init(&oud->cdev, &osd_fops); > oud->cdev.owner = THIS_MODULE; > - error = cdev_add(&oud->cdev, > - MKDEV(SCSI_OSD_MAJOR, oud->minor), 1); > + error = device_add_cdev(&oud->class_dev, &oud->cdev); > if (error) { > OSD_ERR("cdev_add failed\n"); > goto err_put_disk; > } > > /* class device member */ > - oud->class_dev.devt = oud->cdev.dev; > oud->class_dev.class = &osd_uld_class; > oud->class_dev.parent = dev; > oud->class_dev.release = __remove; > @@ -494,7 +495,7 @@ static int osd_probe(struct device *dev) > goto err_put_cdev; > } > > - error = device_register(&oud->class_dev); > + error = device_add(&oud->class_dev); > if (error) { > OSD_ERR("device_register failed => %d\n", error); > goto err_put_cdev; > -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.