From: Nico v. H. <va...@va...> - 2006-10-16 17:12:12
|
I don`t understand the following lines, so i can`t solve the problem, please help!! 325 static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) 326 { 327 //PCI_bus_s *psBus = g_psBus; 328 PCI_bus_s* psBus = get_busmanager( PCI_BUS_NAME, PCI_BUS_VERSION ); 329 if( psBus == NULL ) { 330 return( NULL ); 331 } 332 333 unsigned long flags; 334 335 spin_lock_irqsave(&tp->indirect_lock, flags); 336 psBus->write_pci_config( 337 &(tp)->pdev->nBus, 338 &tp->pdev->nDevice, 339 &tp->pdev->nFunction, 340 TG3PCI_REG_BASE_ADDR, 341 sizeof(off), 342 (uint32)off); 343 //pci_write_config_dword(tp->pdev, TG3PCI_REG_BASE_ADDR, off); 344 psBus->write_pci_config( 345 &tp->pdev->nBus, 346 &tp->pdev->nDevice, 347 &tp->pdev->nFunction, 348 TG3PCI_REG_DATA, 349 val); 350 //pci_write_config_dword(tp->pdev, TG3PCI_REG_DATA, val); 351 spin_unlock_irqrestore(&tp->indirect_lock, flags); 352 } bash-2.03$ make cc -kernel -fno-PIC -c tg3.c -o objs/tg3.o tg3.c:218: warning: parameter names (without types) in function declaration tg3.c:218: warning: data definition has no type or storage class tg3.c: In function `tg3_write_indirect_reg32': tg3.c:330: warning: `return' with a value, in function returning void tg3.c:337: error: dereferencing pointer to incomplete type tg3.c:338: error: dereferencing pointer to incomplete type tg3.c:339: error: dereferencing pointer to incomplete type tg3.c:345: error: dereferencing pointer to incomplete type tg3.c:346: error: dereferencing pointer to incomplete type tg3.c:347: error: dereferencing pointer to incomplete type tg3.c:349: error: too few arguments to function tg3.c:352:2: warning: no newline at end of file make: *** [objs/tg3.o] Error 1 I really want to understand what the psBus does and their functions... can anyone explain and help to solve this?? |