linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ronald Bultje <rbultje@ronald.bitfreak.net>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Linus Torvalds <torvalds@osdl.org>
Subject: [PATCH] 2.6.0-test4 (#7) - correct name field breakage in zoran driver
Date: 24 Aug 2003 12:52:27 +0200	[thread overview]
Message-ID: <1061722346.4303.377.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 677 bytes --]

Hey,

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.

I promise I won't send in more patches after this one for today. :).

Ronald

-- 
Ronald Bultje <rbultje@ronald.bitfreak.net>

[-- Attachment #2: 20030824_name.diff --]
[-- Type: text/plain, Size: 778 bytes --]

--- linux-2.6.0-test4-old/drivers/media/video/zoran.h	Sun Aug 24 01:42:57 2003
+++ linux-2.6.0-test4/drivers/media/video/zoran.h	Sun Aug 24 12:35:59 2003
@@ -146,7 +146,7 @@
 
 #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 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 */

                 reply	other threads:[~2003-08-24 10:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1061722346.4303.377.camel@localhost.localdomain \
    --to=rbultje@ronald.bitfreak.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@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;
as well as URLs for NNTP newsgroup(s).