Re: [PATCH 2/4] Staging: ipack: remove board_name and bus_name fields from struct ipack_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 18, 2012 at 11:10:06AM +0200, Samuel Iglesias Gonsalvez wrote:
> Removed board_name and bus_name fields from struct ipack_device that are
> completely useless.
> 
> Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@xxxxxxxxxx>
> ---
>  drivers/staging/ipack/bridges/tpci200.c |   20 ++++----------------
>  drivers/staging/ipack/bridges/tpci200.h |    8 ++++----
>  drivers/staging/ipack/ipack.h           |    4 ----
>  3 files changed, 8 insertions(+), 24 deletions(-)

Much nicer, and I'll take this, but why are you doing this:

> @@ -450,7 +448,7 @@ static ssize_t tpci200_show_board(struct device *pdev, char *buf, int slot)
>  	struct ipack_device *dev = card->slots[slot].dev;
>  
>  	if (dev != NULL)
> -		return snprintf(buf, PAGE_SIZE, "%s\n", dev->board_name);
> +		return snprintf(buf, PAGE_SIZE, "%s\n", dev_name(&dev->dev));

?  That implies that the name isn't already in the path, which it should
be (or at the least, a symlink should be there, so this sysfs file
should not be needed at all, right?)

Also:
> +	slot_irq->name = dev_name(&dev->dev);

Why do that?  Who needs this name now that we already have it in the
device?  Can't that field be removed entirely now also?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux