mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Greg KH <greg@kroah.com>
Cc: mochel@osdl.org, linux-usb-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] driverfs support for USB - take 2
Date: Thu, 31 Jan 2002 12:49:43 +0000	[thread overview]
Message-ID: <20020131124942.A37@toy.ucw.cz> (raw)
In-Reply-To: <20020130002418.GB21784@kroah.com>
In-Reply-To: <20020130002418.GB21784@kroah.com>; from greg@kroah.com on Tue, Jan 29, 2002 at 04:24:18PM -0800

Hi!

>  static int __init device_init_root(void)
>  {
> -	/* initialize parent bus lists */
> -	return iobus_register(&device_root);
> +	device_root = kmalloc(sizeof(*device_root),GFP_KERNEL);
> +	if (!device_root)
> +		return -ENOMEM;
> +	memset(device_root,0,sizeof(*device_root));
> +	strcpy(device_root->bus_id,"root");
> +	strcpy(device_root->name,"System Root");
> +	return device_register(device_root);
>  }

Why don't you leave device_root allocated statically?

> @@ -1430,9 +1419,11 @@
>  		return NULL;
>  	list_add_tail(&b->node, &pci_root_buses);
>  
> -	sprintf(b->iobus.bus_id,"pci%d",bus);
> -	strcpy(b->iobus.name,"Host/PCI Bridge");
> -	iobus_register(&b->iobus);
> +	b->dev = kmalloc(sizeof(*(b->dev)),GFP_KERNEL);
Uff...				~~~~~~~~~ would not "struct device" (or
what should it be) look better?

> +	memset(b->dev,0,sizeof(*(b->dev)));

								Pavel
-- 
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.


  parent reply	other threads:[~2002-01-31 20:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-30  0:24 Greg KH
2002-01-30  1:03 ` Dave Jones
2002-01-30  1:09   ` Greg KH
2002-01-30  1:19     ` Patrick Mochel
2002-01-30  2:15       ` [linux-usb-devel] " David Brownell
2002-01-30  4:09         ` Greg KH
2002-01-30 20:07           ` [linux-usb-devel] " David Brownell
2002-02-02  0:18             ` Greg KH
2002-02-02 19:13               ` David Brownell
2002-02-05  6:49                 ` Greg KH
2002-01-30  1:49 ` [linux-usb-devel] " Stephen J. Gowdy
2002-01-30  4:10   ` Greg KH
2002-01-30 18:26 ` Patrick Mochel
2002-01-30 20:24   ` [linux-usb-devel] " David Brownell
2002-02-02  0:23     ` Greg KH
2002-02-02 19:27       ` David Brownell
2002-01-31 12:49 ` Pavel Machek [this message]
2002-02-01  9:27   ` Horst von Brand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020131124942.A37@toy.ucw.cz \
    --to=pavel@suse.cz \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=mochel@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®