From: Ronald Bultje <rbultje@ronald.bitfreak.net>

I suddenly noticed that 2.6.0-test4 seems to have removed the struct
device->name field, apparently for memory consumption reasons. Linus
changed this to pci_name((zr)->pci_dev) in my driver, and that's almost
correct, except that it is the PCI device ID, and I'm not supposed to
touch it. Also, since it's only 4 bytes, all my device names now show
like 'DC1' (this should be 'DC10plus') and alike.

The attached patch fixes this by going back to the behaviour that we
used in 2.4.x: we use a separate name field in our private driver
struct.



 drivers/media/video/zoran.h |    4 +---
 1 files changed, 1 insertion(+), 3 deletions(-)

diff -puN drivers/media/video/zoran.h~zoran-naming-fix drivers/media/video/zoran.h
--- 25/drivers/media/video/zoran.h~zoran-naming-fix	2003-08-24 11:56:13.000000000 -0700
+++ 25-akpm/drivers/media/video/zoran.h	2003-08-24 11:56:13.000000000 -0700
@@ -146,7 +146,7 @@ Private IOCTL to set up for displaying M
 
 #define ZORAN_NAME    "ZORAN"	/* name of the device */
 
-#define ZR_DEVNAME(zr) pci_name((zr)->pci_dev)
+#define ZR_DEVNAME(zr) ((zr)->name)
 
 #define   BUZ_MAX_WIDTH   (zr->timing->Wa)
 #define   BUZ_MAX_HEIGHT  (zr->timing->Ha)
@@ -403,9 +403,7 @@ struct zoran {
 	struct tvnorm *timing;
 
 	unsigned short id;	/* number of this device */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 	char name[32];		/* name of this device */
-#endif
 	struct pci_dev *pci_dev;	/* PCI device */
 	unsigned char revision;	/* revision of zr36057 */
 	unsigned int zr36057_adr;	/* bus address of IO mem returned by PCI BIOS */

_