[MPlayer-matrox] r262 - mga_vid/trunk/mga_vid.c

attila subversion at mplayerhq.hu
Sun Feb 3 21:25:03 CET 2008


Author: attila
Date: Sun Feb  3 21:25:02 2008
New Revision: 262

Log:
driver clean up, no functional changes:
* replace deprecated pci_find_device by pci_get_device
* replace strcyp by proper kobject_set_name


Modified:
   mga_vid/trunk/mga_vid.c

Modified: mga_vid/trunk/mga_vid.c
==============================================================================
--- mga_vid/trunk/mga_vid.c	(original)
+++ mga_vid/trunk/mga_vid.c	Sun Feb  3 21:25:02 2008
@@ -784,7 +784,7 @@ static int mga_vid_find_card(void)
 	char *mga_dev_name;
 	mga_card_t *card;
 
-	while ((dev = pci_find_device(PCI_VENDOR_ID_MATROX, PCI_ANY_ID, dev))) {
+	while ((dev = pci_get_device(PCI_VENDOR_ID_MATROX, PCI_ANY_ID, dev))) {
 		mga_dev_name = "";
 		mga_cards_num++;
 		if (mga_cards_num == MGA_MAX_CARDS) {
@@ -1103,7 +1103,7 @@ static int mga_vid_initialize(void)
 		/* Allocate a cdev for this character device, and fill in some parameters it needs */
 		mga_vid_cdev = cdev_alloc();
 		mga_vid_cdev->owner = THIS_MODULE;
-		strcpy(mga_vid_cdev->kobj.name, MODULENAME);
+		kobject_set_name(&mga_vid_cdev->kobj, MODULENAME);
 		mga_vid_cdev->ops = &mga_vid_fops;
 		/* Add this character device to the system */
 		cdev_add(mga_vid_cdev, mga_cdev_handle, mga_cards_num);



More information about the MPlayer-matrox mailing list