mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Should osst call cdev_alloc()
@ 2004-10-23 17:10 Willem Riede
  2004-10-23 20:56 ` Kai Makisara
  0 siblings, 1 reply; 3+ messages in thread
From: Willem Riede @ 2004-10-23 17:10 UTC (permalink / raw)
  To: linux-kernel

Currently, sg.c and st.c contain calls to cdev_alloc() and friends:


[wriede@serve kernel]$ find linux-2.6.9 -name '*.c' | xargs grep cdev_alloc
linux-2.6.9/drivers/s390/char/tape_class.c:     tcd->char_device =
cdev_alloc();
linux-2.6.9/drivers/scsi/sg.c:  cdev = cdev_alloc();
linux-2.6.9/drivers/scsi/sg.c:          printk(KERN_WARNING "cdev_alloc
failed\n");
linux-2.6.9/drivers/scsi/st.c:                  cdev = cdev_alloc();
linux-2.6.9/fs/char_dev.c:      cdev = cdev_alloc();
linux-2.6.9/fs/char_dev.c:struct cdev *cdev_alloc(void)
linux-2.6.9/fs/char_dev.c:EXPORT_SYMBOL(cdev_alloc);


My question is: should osst do the same? It seems to work just fine without.

Please cc me on answers, as I'm currently not subscribed to linux-kernel.

Thanks, Willem Riede,
osst maintainer


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Should osst call cdev_alloc()
  2004-10-23 17:10 Should osst call cdev_alloc() Willem Riede
@ 2004-10-23 20:56 ` Kai Makisara
  2004-10-23 21:14   ` Willem Riede
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Makisara @ 2004-10-23 20:56 UTC (permalink / raw)
  To: Willem Riede; +Cc: linux-kernel

On Sat, 23 Oct 2004, Willem Riede wrote:

> Currently, sg.c and st.c contain calls to cdev_alloc() and friends:
> 
> 
> [wriede@serve kernel]$ find linux-2.6.9 -name '*.c' | xargs grep cdev_alloc
> linux-2.6.9/drivers/s390/char/tape_class.c:     tcd->char_device =
> cdev_alloc();
> linux-2.6.9/drivers/scsi/sg.c:  cdev = cdev_alloc();
> linux-2.6.9/drivers/scsi/sg.c:          printk(KERN_WARNING "cdev_alloc
> failed\n");
> linux-2.6.9/drivers/scsi/st.c:                  cdev = cdev_alloc();
> linux-2.6.9/fs/char_dev.c:      cdev = cdev_alloc();
> linux-2.6.9/fs/char_dev.c:struct cdev *cdev_alloc(void)
> linux-2.6.9/fs/char_dev.c:EXPORT_SYMBOL(cdev_alloc);
> 
> 
> My question is: should osst do the same? It seems to work just fine without.
> 
The reason why st.c calls cdev_alloc() directly is that this allows it to 
use the large minor numbers (some people want to use more than 32 tapes).
This also used to give presence in sysfs but that is not the case any 
more. The devices can be shown in sysfs using device classes (st.c uses 
the class_simple_* functions).

Osst does call cdev_alloc() indirectly through register_chrdev(). This is 
the link between the "old style" character device allocation and the 
current method. As long as register_chrdev() exists, you don't have any 
pressing need to change osst unless you want to support more than 256 
minors.

-- 
Kai

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Should osst call cdev_alloc()
  2004-10-23 20:56 ` Kai Makisara
@ 2004-10-23 21:14   ` Willem Riede
  0 siblings, 0 replies; 3+ messages in thread
From: Willem Riede @ 2004-10-23 21:14 UTC (permalink / raw)
  To: Kai Makisara; +Cc: linux-kernel

On 10/23/2004 04:56:06 PM, Kai Makisara wrote:
> On Sat, 23 Oct 2004, Willem Riede wrote:
> 
> > Currently, sg.c and st.c contain calls to cdev_alloc() and friends:
> >
> > My question is: should osst do the same? It seems to work just fine
> without.
> >
> The reason why st.c calls cdev_alloc() directly is that this allows it to
> use the large minor numbers (some people want to use more than 32 tapes).
> This also used to give presence in sysfs but that is not the case any
> more. The devices can be shown in sysfs using device classes (st.c uses
> the class_simple_* functions).
> 
> Osst does call cdev_alloc() indirectly through register_chrdev(). This is
> the link between the "old style" character device allocation and the
> current method. As long as register_chrdev() exists, you don't have any
> pressing need to change osst unless you want to support more than 256
> minors.

Thanks. Given that the Onstream devices were targeted at the low end market, I  
see no need to support many drives of this type, so I'll leave it as it is.

Willem Riede.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-23 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-23 17:10 Should osst call cdev_alloc() Willem Riede
2004-10-23 20:56 ` Kai Makisara
2004-10-23 21:14   ` Willem Riede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®