All of lore.kernel.org
 help / color / mirror / Atom feed
From: Harvey Harrison <harvey.harrison@gmail.com>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Pierre Ossman <drzeus@drzeus.cx>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Greg KH <greg@kroah.com>
Subject: Re: mmc: struct device - replace bus_id with dev_name(), dev_set_name()
Date: Wed, 29 Oct 2008 18:48:04 -0700	[thread overview]
Message-ID: <1225331284.5496.12.camel@brick> (raw)
In-Reply-To: <1225329600.5970.72.camel@nga.site>

On Thu, 2008-10-30 at 02:20 +0100, Kay Sievers wrote:
> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
> index ee6e822..403aa50 100644
> --- a/include/linux/mmc/card.h
> +++ b/include/linux/mmc/card.h
> @@ -130,7 +130,7 @@ struct mmc_card {
>  #define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR)
>  
>  #define mmc_card_name(c)	((c)->cid.prod_name)
> -#define mmc_card_id(c)		((c)->dev.bus_id)
> +#define mmc_card_id(c)		(dev_name(&(c)->dev))
>  
>  #define mmc_list_to_card(l)	container_of(l, struct mmc_card, node)
>  #define mmc_get_drvdata(c)	dev_get_drvdata(&(c)->dev)
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index bde891f..f842f23 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -176,7 +176,7 @@ static inline void *mmc_priv(struct mmc_host *host)
>  
>  #define mmc_dev(x)	((x)->parent)
>  #define mmc_classdev(x)	(&(x)->class_dev)
> -#define mmc_hostname(x)	((x)->class_dev.bus_id)
> +#define mmc_hostname(x)	(dev_name(&(x)->class_dev))
>  
>  extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
>  extern int mmc_resume_host(struct mmc_host *);
> diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
> index 07bee4a..451bdfc 100644
> --- a/include/linux/mmc/sdio_func.h
> +++ b/include/linux/mmc/sdio_func.h
> @@ -63,7 +63,7 @@ struct sdio_func {
>  
>  #define sdio_func_set_present(f) ((f)->state |= SDIO_STATE_PRESENT)
>  
> -#define sdio_func_id(f)		((f)->dev.bus_id)
> +#define sdio_func_id(f)		(dev_name(&(f)->dev))
>  
>  #define sdio_get_drvdata(f)	dev_get_drvdata(&(f)->dev)
>  #define sdio_set_drvdata(f,d)	dev_set_drvdata(&(f)->dev, d)
> 

A lot of these helpers don't seem to add that much, would you care for
a patch removing them Pierre?

Specifically sdio_func_id, sdio_get/set_drvdata don't have that many
users.

mmc_hostname has a lot of users, but if you're agreeable, I could
take a crack at that too.

Harvey


  reply	other threads:[~2008-10-30  1:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30  1:20 mmc: struct device - replace bus_id with dev_name(), dev_set_name() Kay Sievers
2008-10-30  1:48 ` Harvey Harrison [this message]
2008-10-30  4:37   ` Marcel Holtmann
2008-10-30  5:15     ` Harvey Harrison
2008-10-30  9:09   ` Pierre Ossman
2008-10-30  9:06 ` Pierre Ossman
2008-10-30  9:21   ` Kay Sievers
  -- strict thread matches above, loose matches on Subject: below --
2009-01-25 22:50 Kay Sievers
2009-02-02 20:09 ` Pierre Ossman

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=1225331284.5496.12.camel@brick \
    --to=harvey.harrison@gmail.com \
    --cc=drzeus@drzeus.cx \
    --cc=greg@kroah.com \
    --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.