All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Jiri Kosina <jkosina@suse.cz>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Greg KH <greg@kroah.com>
Subject: Re: hid: struct device - replace bus_id with dev_name(), dev_set_name()
Date: Thu, 30 Oct 2008 20:25:41 +0100	[thread overview]
Message-ID: <490A0A35.9060606@gmail.com> (raw)
In-Reply-To: <1225385705.21973.20.camel@nga.site>

Kay Sievers napsal(a):
> switch over to the new api, which will remove the 20 bytes array
> and does no longer have a size limitation.

Cool!

> From: Kay Sievers <kay.sievers@vrfy.org>
> Subject: hid: struct device - replace bus_id with dev_name(), dev_set_name()
> 
> CC: Jiri Kosina <jkosina@suse.cz>
> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org>
> ---
> 
> 
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 721a36d..73ccc37 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1573,9 +1573,8 @@ int hid_add_device(struct hid_device *hdev)
>  	if (hid_ignore(hdev))
>  		return -ENODEV;
>  
> -	/* XXX hack, any other cleaner solution < 20 bus_id bytes? */
> -	sprintf(hdev->dev.bus_id, "%04X:%04X:%04X.%04X", hdev->bus,
> -			hdev->vendor, hdev->product, atomic_inc_return(&id));
> +	dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
> +		     hdev->vendor, hdev->product, atomic_inc_return(&id));

Could you left the comment above to remind us about removing this ugly hack
later when the new non-limited api will be used?

  reply	other threads:[~2008-10-30 19:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 16:55 hid: struct device - replace bus_id with dev_name(), dev_set_name() Kay Sievers
2008-10-30 19:25 ` Jiri Slaby [this message]
2008-10-30 19:35   ` Kay Sievers
2008-10-30 23:10     ` Jiri Kosina
2008-10-30 23:16       ` Kay Sievers
2008-10-30 23:19         ` Jiri Kosina

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=490A0A35.9060606@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=greg@kroah.com \
    --cc=jkosina@suse.cz \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.