mirror of https://github.com/ipxe/ipxe.git
[pci] Make driver PCI ID a property of the PCI device
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/1/head
parent
abb5590b29
commit
5bde349e55
|
@ -62,8 +62,7 @@ static struct undi_rom * undipci_find_rom ( struct pci_device *pci ) {
|
|||
* @v id PCI ID
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int undipci_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused ) {
|
||||
static int undipci_probe ( struct pci_device *pci ) {
|
||||
struct undi_device *undi;
|
||||
struct undi_rom *undirom;
|
||||
int rc;
|
||||
|
|
|
@ -192,9 +192,9 @@ static int pci_probe ( struct pci_device *pci ) {
|
|||
( id->device != pci->device ) )
|
||||
continue;
|
||||
pci->driver = driver;
|
||||
pci->driver_name = id->name;
|
||||
DBGC ( pci, "...using driver %s\n", pci->driver_name );
|
||||
if ( ( rc = driver->probe ( pci, id ) ) != 0 ) {
|
||||
pci->id = id;
|
||||
DBGC ( pci, "...using driver %s\n", pci->id->name );
|
||||
if ( ( rc = driver->probe ( pci ) ) != 0 ) {
|
||||
DBGC ( pci, "......probe failed: %s\n",
|
||||
strerror ( rc ) );
|
||||
continue;
|
||||
|
|
|
@ -2642,8 +2642,7 @@ static int arbel_configure_special_qps ( struct arbel *arbel ) {
|
|||
* @v id PCI ID
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int arbel_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused ) {
|
||||
static int arbel_probe ( struct pci_device *pci ) {
|
||||
struct arbel *arbel;
|
||||
struct ib_device *ibdev;
|
||||
struct arbelprm_init_hca init_hca;
|
||||
|
|
|
@ -3332,8 +3332,7 @@ static void hermon_reset ( struct hermon *hermon,
|
|||
* @v id PCI ID
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int hermon_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused ) {
|
||||
static int hermon_probe ( struct pci_device *pci ) {
|
||||
struct hermon *hermon;
|
||||
struct ib_device *ibdev;
|
||||
struct net_device *netdev;
|
||||
|
|
|
@ -2316,8 +2316,7 @@ static int linda_init_ib_serdes ( struct linda *linda ) {
|
|||
* @v id PCI ID
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int linda_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused ) {
|
||||
static int linda_probe ( struct pci_device *pci ) {
|
||||
struct ib_device *ibdev;
|
||||
struct linda *linda;
|
||||
struct QIB_7220_Revision revision;
|
||||
|
|
|
@ -2281,8 +2281,7 @@ static void qib7322_reset ( struct qib7322 *qib7322, struct pci_device *pci ) {
|
|||
* @v id PCI ID
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int qib7322_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused ) {
|
||||
static int qib7322_probe ( struct pci_device *pci ) {
|
||||
struct qib7322 *qib7322;
|
||||
struct QIB_7322_Revision revision;
|
||||
struct ib_device *ibdev;
|
||||
|
|
|
@ -865,8 +865,7 @@ static struct net_device_operations a3c90x_operations = {
|
|||
*
|
||||
* @ret rc Returns 0 on success, negative on failure
|
||||
*/
|
||||
static int a3c90x_probe(struct pci_device *pci,
|
||||
const struct pci_device_id *pci_id __unused)
|
||||
static int a3c90x_probe(struct pci_device *pci)
|
||||
{
|
||||
|
||||
struct net_device *netdev;
|
||||
|
|
|
@ -157,8 +157,7 @@ static const struct {
|
|||
/*
|
||||
* Prototypes - PCI stack related functions
|
||||
*/
|
||||
static int ath5k_probe(struct pci_device *pdev,
|
||||
const struct pci_device_id *id);
|
||||
static int ath5k_probe(struct pci_device *pdev);
|
||||
static void ath5k_remove(struct pci_device *pdev);
|
||||
|
||||
struct pci_driver ath5k_pci_driver __pci_driver = {
|
||||
|
@ -284,8 +283,7 @@ ath5k_chip_name(enum ath5k_srev_type type, u16 val)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int ath5k_probe(struct pci_device *pdev,
|
||||
const struct pci_device_id *id)
|
||||
static int ath5k_probe(struct pci_device *pdev)
|
||||
{
|
||||
void *mem;
|
||||
struct ath5k_softc *sc;
|
||||
|
@ -371,7 +369,7 @@ static int ath5k_probe(struct pci_device *pdev,
|
|||
dev->netdev->dev = (struct device *)pdev;
|
||||
|
||||
/* Initialize device */
|
||||
ret = ath5k_hw_attach(sc, id->driver_data, &sc->ah);
|
||||
ret = ath5k_hw_attach(sc, pdev->id->driver_data, &sc->ah);
|
||||
if (ret)
|
||||
goto err_free_hwinfo;
|
||||
|
||||
|
|
|
@ -1123,8 +1123,7 @@ static void atl1e_init_netdev(struct net_device *netdev, struct pci_device *pdev
|
|||
* The OS initialization, configuring of the adapter private structure,
|
||||
* and a hardware reset occur.
|
||||
*/
|
||||
static int atl1e_probe(struct pci_device *pdev,
|
||||
const struct pci_device_id *ent __unused)
|
||||
static int atl1e_probe(struct pci_device *pdev)
|
||||
{
|
||||
struct net_device *netdev;
|
||||
struct atl1e_adapter *adapter = NULL;
|
||||
|
|
|
@ -638,7 +638,7 @@ static void b44_set_rx_mode(struct net_device *netdev)
|
|||
* @v id Matching entry in ID table
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int b44_probe(struct pci_device *pci, const struct pci_device_id *id)
|
||||
static int b44_probe(struct pci_device *pci)
|
||||
{
|
||||
struct net_device *netdev;
|
||||
struct b44_private *bp;
|
||||
|
@ -694,8 +694,9 @@ static int b44_probe(struct pci_device *pci, const struct pci_device_id *id)
|
|||
|
||||
b44_chip_reset(bp, B44_CHIP_RESET_FULL);
|
||||
|
||||
DBG("b44 %s (%04x:%04x) regs=%p MAC=%s\n", id->name, id->vendor,
|
||||
id->device, bp->regs, eth_ntoa(netdev->ll_addr));
|
||||
DBG("b44 %s (%04x:%04x) regs=%p MAC=%s\n", pci->id->name,
|
||||
pci->id->vendor, pci->id->device, bp->regs,
|
||||
eth_ntoa(netdev->ll_addr));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -453,8 +453,7 @@ static void b44_free_rx_ring ( struct b44_private *bp );
|
|||
static void b44_rx_refill ( struct b44_private *bp, u32 pending );
|
||||
static void b44_populate_rx_descriptor (struct b44_private *bp, u32 index);
|
||||
|
||||
static int b44_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id );
|
||||
static int b44_probe ( struct pci_device *pci );
|
||||
static void b44_remove ( struct pci_device *pci );
|
||||
|
||||
static int b44_open ( struct net_device *netdev );
|
||||
|
|
|
@ -458,7 +458,7 @@ static int dmfe_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
|
||||
BASE = pci->ioaddr;
|
||||
printf("dmfe.c: Found %s Vendor=0x%hX Device=0x%hX\n",
|
||||
pci->driver_name, pci->vendor, pci->device);
|
||||
pci->id->name, pci->vendor, pci->device);
|
||||
|
||||
/* Read Chip revision */
|
||||
pci_read_config_dword(pci, PCI_REVISION_ID, &dev_rev);
|
||||
|
@ -489,7 +489,8 @@ static int dmfe_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
nic->node_addr[i] = db->srom[20 + i];
|
||||
|
||||
/* Print out some hardware info */
|
||||
DBG ( "%s: %s at ioaddr %4.4lx\n", pci->driver_name, eth_ntoa ( nic->node_addr ), BASE );
|
||||
DBG ( "%s: %s at ioaddr %4.4lx\n",
|
||||
pci->id->name, eth_ntoa ( nic->node_addr ), BASE );
|
||||
|
||||
/* Set the card as PCI Bus Master */
|
||||
adjust_pci_device(pci);
|
||||
|
|
|
@ -121,8 +121,7 @@ s32 e1000_mng_write_dhcp_info(struct e1000_hw * hw,
|
|||
u8 *buffer, u16 length);
|
||||
u32 e1000_translate_register_82542(u32 reg) __attribute__((weak));
|
||||
|
||||
extern int e1000_probe(struct pci_device *pdev,
|
||||
const struct pci_device_id *id __unused);
|
||||
extern int e1000_probe(struct pci_device *pdev);
|
||||
extern void e1000_remove(struct pci_device *pdev);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -689,8 +689,7 @@ static struct net_device_operations e1000_operations;
|
|||
*
|
||||
* @ret rc Return status code
|
||||
**/
|
||||
int e1000_probe ( struct pci_device *pdev,
|
||||
const struct pci_device_id *id __unused )
|
||||
int e1000_probe ( struct pci_device *pdev )
|
||||
{
|
||||
int i, err;
|
||||
struct net_device *netdev;
|
||||
|
|
|
@ -276,8 +276,7 @@ extern void e1000e_init_function_pointers_80003es2lan(struct e1000_hw *hw)
|
|||
extern void e1000e_init_function_pointers_ich8lan(struct e1000_hw *hw)
|
||||
__attribute__((weak));
|
||||
|
||||
extern int e1000e_probe(struct pci_device *pdev,
|
||||
const struct pci_device_id *id __unused);
|
||||
extern int e1000e_probe(struct pci_device *pdev);
|
||||
|
||||
extern void e1000e_remove(struct pci_device *pdev);
|
||||
|
||||
|
|
|
@ -1005,8 +1005,7 @@ static struct net_device_operations e1000e_operations;
|
|||
*
|
||||
* @ret rc Return status code
|
||||
**/
|
||||
int e1000e_probe ( struct pci_device *pdev,
|
||||
const struct pci_device_id *ent)
|
||||
int e1000e_probe ( struct pci_device *pdev )
|
||||
{
|
||||
int i, err;
|
||||
struct net_device *netdev;
|
||||
|
@ -1014,7 +1013,7 @@ int e1000e_probe ( struct pci_device *pdev,
|
|||
unsigned long mmio_start, mmio_len;
|
||||
unsigned long flash_start, flash_len;
|
||||
struct e1000_hw *hw;
|
||||
const struct e1000_info *ei = e1000_info_tbl[ent->driver_data];
|
||||
const struct e1000_info *ei = e1000_info_tbl[pdev->id->driver_data];
|
||||
|
||||
DBGP ( "e1000_probe\n" );
|
||||
|
||||
|
|
|
@ -167,8 +167,7 @@ static struct net_device_operations ifec_operations = {
|
|||
* This function is called very early on, while iPXE is initializing.
|
||||
* This is a iPXE PCI Device Driver API function.
|
||||
*/
|
||||
static int ifec_pci_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused )
|
||||
static int ifec_pci_probe ( struct pci_device *pci )
|
||||
{
|
||||
struct net_device *netdev;
|
||||
struct ifec_private *priv;
|
||||
|
|
|
@ -171,7 +171,7 @@ struct ifec_private {
|
|||
/**************************** Function prototypes ****************************/
|
||||
|
||||
/* PCI device API prototypes */
|
||||
static int ifec_pci_probe ( struct pci_device*, const struct pci_device_id*);
|
||||
static int ifec_pci_probe ( struct pci_device *pci );
|
||||
static void ifec_pci_remove ( struct pci_device *pci );
|
||||
|
||||
/* Network device API prototypes */
|
||||
|
|
|
@ -4129,8 +4129,7 @@ efab_remove ( struct pci_device *pci )
|
|||
}
|
||||
|
||||
static int
|
||||
efab_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id )
|
||||
efab_probe ( struct pci_device *pci )
|
||||
{
|
||||
struct net_device *netdev;
|
||||
struct efab_nic *efab;
|
||||
|
@ -4190,7 +4189,7 @@ efab_probe ( struct pci_device *pci,
|
|||
goto fail5;
|
||||
}
|
||||
|
||||
EFAB_LOG ( "Found %s EtherFabric %s %s revision %d\n", id->name,
|
||||
EFAB_LOG ( "Found %s EtherFabric %s %s revision %d\n", pci->id->name,
|
||||
efab->is_asic ? "ASIC" : "FPGA",
|
||||
efab->phy_10g ? "10G" : "1G",
|
||||
efab->pci_revision );
|
||||
|
|
|
@ -1796,7 +1796,7 @@ err_ioremap:
|
|||
* @ret rc Return status code
|
||||
**/
|
||||
static int
|
||||
forcedeth_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
|
||||
forcedeth_probe ( struct pci_device *pdev )
|
||||
{
|
||||
struct net_device *netdev;
|
||||
struct forcedeth_private *priv;
|
||||
|
@ -1806,7 +1806,7 @@ forcedeth_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
|
|||
DBGP ( "forcedeth_probe\n" );
|
||||
|
||||
DBG ( "Found %s, vendor = %#04x, device = %#04x\n",
|
||||
pdev->driver_name, ent->vendor, ent->device );
|
||||
pdev->id->name, pdev->id->vendor, pdev->id->device );
|
||||
|
||||
/* Allocate our private data */
|
||||
netdev = alloc_etherdev ( sizeof ( *priv ) );
|
||||
|
@ -1829,7 +1829,7 @@ forcedeth_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
|
|||
/* We'll need these set up for the rest of the routines */
|
||||
priv->pci_dev = pdev;
|
||||
priv->netdev = netdev;
|
||||
priv->driver_data = ent->driver_data;
|
||||
priv->driver_data = pdev->id->driver_data;
|
||||
|
||||
adjust_pci_device ( pdev );
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ FILE_LICENCE ( GPL2_ONLY );
|
|||
|
||||
#include "igb_api.h"
|
||||
|
||||
extern int igb_probe ( struct pci_device *pdev, const struct pci_device_id *ent);
|
||||
extern int igb_probe ( struct pci_device *pdev );
|
||||
extern void igb_remove ( struct pci_device *pdev );
|
||||
|
||||
struct igb_adapter;
|
||||
|
|
|
@ -771,8 +771,7 @@ static struct net_device_operations igb_operations;
|
|||
*
|
||||
* @ret rc Return status code
|
||||
**/
|
||||
int igb_probe ( struct pci_device *pdev,
|
||||
const struct pci_device_id *ent __unused)
|
||||
int igb_probe ( struct pci_device *pdev )
|
||||
{
|
||||
int i, err;
|
||||
struct net_device *netdev;
|
||||
|
|
|
@ -779,8 +779,7 @@ void igbvf_get_hw_control ( struct igbvf_adapter *adapter )
|
|||
* The OS initialization, configuring of the adapter private structure,
|
||||
* and a hardware reset occur.
|
||||
**/
|
||||
int igbvf_probe ( struct pci_device *pdev,
|
||||
const struct pci_device_id *ent __unused )
|
||||
int igbvf_probe ( struct pci_device *pdev )
|
||||
{
|
||||
int err;
|
||||
struct net_device *netdev;
|
||||
|
|
|
@ -1175,7 +1175,7 @@ jme_load_macaddr(struct net_device *netdev)
|
|||
* @ret rc Return status code
|
||||
*/
|
||||
static int
|
||||
jme_probe(struct pci_device *pci, const struct pci_device_id *id __unused)
|
||||
jme_probe(struct pci_device *pci)
|
||||
{
|
||||
struct net_device *netdev;
|
||||
struct jme_adapter *jme;
|
||||
|
|
|
@ -617,7 +617,7 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
nic->ioaddr = pci->ioaddr;
|
||||
nic->irqno = 0;
|
||||
|
||||
mtdx.nic_name = pci->driver_name;
|
||||
mtdx.nic_name = pci->id->name;
|
||||
mtdx.dev_id = pci->device;
|
||||
mtdx.ioaddr = nic->ioaddr;
|
||||
|
||||
|
|
|
@ -94,8 +94,7 @@ FILE_LICENCE ( GPL2_ONLY );
|
|||
|
||||
/* PCI driver entry points */
|
||||
|
||||
static int myri10ge_pci_probe ( struct pci_device*,
|
||||
const struct pci_device_id* );
|
||||
static int myri10ge_pci_probe ( struct pci_device* );
|
||||
static void myri10ge_pci_remove ( struct pci_device* );
|
||||
|
||||
/* Network device operations */
|
||||
|
@ -771,8 +770,7 @@ myri10ge_nv_fini ( struct myri10ge_private *priv )
|
|||
* This function is called very early on, while iPXE is initializing.
|
||||
* This is a iPXE PCI Device Driver API function.
|
||||
*/
|
||||
static int myri10ge_pci_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused )
|
||||
static int myri10ge_pci_probe ( struct pci_device *pci )
|
||||
{
|
||||
static struct net_device_operations myri10ge_operations = {
|
||||
.open = myri10ge_net_open,
|
||||
|
|
|
@ -83,7 +83,7 @@ FILE_LICENCE ( GPL_ANY );
|
|||
static int natsemi_spi_read_bit ( struct bit_basher *, unsigned int );
|
||||
static void natsemi_spi_write_bit ( struct bit_basher *,unsigned int, unsigned long );
|
||||
static void natsemi_init_eeprom ( struct natsemi_private * );
|
||||
static int natsemi_probe (struct pci_device *pci, const struct pci_device_id *id);
|
||||
static int natsemi_probe (struct pci_device *pci);
|
||||
static void natsemi_reset (struct net_device *netdev);
|
||||
static int natsemi_open (struct net_device *netdev);
|
||||
static int natsemi_transmit (struct net_device *netdev, struct io_buffer *iobuf);
|
||||
|
@ -164,8 +164,7 @@ static void natsemi_init_eeprom ( struct natsemi_private *np ) {
|
|||
* @v id PCI ID
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int natsemi_probe (struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused) {
|
||||
static int natsemi_probe (struct pci_device *pci) {
|
||||
struct net_device *netdev;
|
||||
struct natsemi_private *np = NULL;
|
||||
uint8_t ll_addr_encoded[MAX_LL_ADDR_LEN];
|
||||
|
|
|
@ -824,7 +824,7 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
return 0;
|
||||
|
||||
printf("ns83820.c: Found %s, vendor=0x%hX, device=0x%hX\n",
|
||||
pci->driver_name, pci->vendor, pci->device);
|
||||
pci->id->name, pci->vendor, pci->device);
|
||||
|
||||
/* point to private storage */
|
||||
ns = &nsx;
|
||||
|
@ -862,12 +862,12 @@ static int ns83820_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
ns->CFG_cache = readl(ns->base + CFG);
|
||||
|
||||
if ((ns->CFG_cache & CFG_PCI64_DET)) {
|
||||
printf("%s: detected 64 bit PCI data bus.\n", pci->driver_name);
|
||||
printf("%s: detected 64 bit PCI data bus.\n", pci->id->name);
|
||||
/*dev->CFG_cache |= CFG_DATA64_EN; */
|
||||
if (!(ns->CFG_cache & CFG_DATA64_EN))
|
||||
printf
|
||||
("%s: EEPROM did not enable 64 bit bus. Disabled.\n",
|
||||
pci->driver_name);
|
||||
pci->id->name);
|
||||
} else
|
||||
ns->CFG_cache &= ~(CFG_DATA64_EN);
|
||||
|
||||
|
|
|
@ -1034,7 +1034,7 @@ static struct net_device_operations pcnet32_operations = {
|
|||
* @ret rc Return status code
|
||||
**/
|
||||
static int
|
||||
pcnet32_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
|
||||
pcnet32_probe ( struct pci_device *pdev )
|
||||
{
|
||||
struct net_device *netdev;
|
||||
struct pcnet32_private *priv;
|
||||
|
@ -1044,7 +1044,7 @@ pcnet32_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
|
|||
DBGP ( "pcnet32_probe\n" );
|
||||
|
||||
DBG ( "Found %s, vendor = %#04x, device = %#04x\n",
|
||||
pdev->driver_name, ent->vendor, ent->device );
|
||||
pdev->id->name, pdev->id->vendor, pdev->id->device );
|
||||
|
||||
/* Allocate our private data */
|
||||
netdev = alloc_etherdev ( sizeof ( *priv ) );
|
||||
|
|
|
@ -2038,8 +2038,7 @@ static int phantom_init_rcvpeg ( struct phantom_nic *phantom ) {
|
|||
* @v id PCI ID
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int phantom_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused ) {
|
||||
static int phantom_probe ( struct pci_device *pci ) {
|
||||
struct net_device *netdev;
|
||||
struct phantom_nic *phantom;
|
||||
struct settings *parent_settings;
|
||||
|
|
|
@ -215,8 +215,7 @@ static void pnic_remove ( struct pci_device *pci ) {
|
|||
/**************************************************************************
|
||||
PROBE - Look for an adapter, this routine's visible to the outside
|
||||
***************************************************************************/
|
||||
static int pnic_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused ) {
|
||||
static int pnic_probe ( struct pci_device *pci ) {
|
||||
struct net_device *netdev;
|
||||
struct pnic *pnic;
|
||||
uint16_t api_version;
|
||||
|
|
|
@ -2050,18 +2050,19 @@ static struct net_device_operations rtl8169_operations = {
|
|||
* @ret rc Return status code
|
||||
**/
|
||||
static int
|
||||
rtl8169_probe ( struct pci_device *pdev, const struct pci_device_id *ent )
|
||||
rtl8169_probe ( struct pci_device *pdev )
|
||||
{
|
||||
int i, rc;
|
||||
struct net_device *netdev;
|
||||
struct rtl8169_private *tp;
|
||||
void *ioaddr;
|
||||
|
||||
const struct rtl_cfg_info *cfg = rtl_cfg_infos + ent->driver_data;
|
||||
const struct rtl_cfg_info *cfg = rtl_cfg_infos + pdev->id->driver_data;
|
||||
|
||||
DBGP ( "rtl8169_probe\n" );
|
||||
|
||||
DBG ( "ent->vendor = %#04x, ent->device = %#04x\n", ent->vendor, ent->device );
|
||||
DBG ( "id->vendor = %#04x, id->device = %#04x\n",
|
||||
pdev->id->vendor, pdev->id->device );
|
||||
|
||||
DBG ( "cfg->intr_event = %#04x\n", cfg->intr_event );
|
||||
|
||||
|
|
|
@ -505,8 +505,7 @@ static struct net_device_operations rtl_operations = {
|
|||
* @v id PCI ID
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int rtl_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused ) {
|
||||
static int rtl_probe ( struct pci_device *pci ) {
|
||||
struct net_device *netdev;
|
||||
struct rtl8139_nic *rtl;
|
||||
int rc;
|
||||
|
|
|
@ -649,8 +649,7 @@ struct net80211_device_operations rtl818x_operations = {
|
|||
.config = rtl818x_config,
|
||||
};
|
||||
|
||||
static int rtl818x_probe(struct pci_device *pdev,
|
||||
const struct pci_device_id *id __unused)
|
||||
static int rtl818x_probe(struct pci_device *pdev )
|
||||
{
|
||||
struct net80211_device *dev;
|
||||
struct rtl818x_priv *priv;
|
||||
|
|
|
@ -47,8 +47,7 @@ static struct pci_device_id sis190_isa_bridge_tbl[] = {
|
|||
PCI_ID (0x1039, 0x0968, "", "", 0),
|
||||
};
|
||||
|
||||
static int sis190_isa_bridge_probe(struct pci_device *pdev __unused,
|
||||
const struct pci_device_id *ent __unused)
|
||||
static int sis190_isa_bridge_probe(struct pci_device *pdev __unused)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -1110,8 +1109,7 @@ static struct net_device_operations sis190_netdev_ops = {
|
|||
.irq = sis190_irq,
|
||||
};
|
||||
|
||||
static int sis190_probe(struct pci_device *pdev,
|
||||
const struct pci_device_id *ent __unused)
|
||||
static int sis190_probe(struct pci_device *pdev)
|
||||
{
|
||||
struct sis190_private *tp;
|
||||
struct net_device *dev;
|
||||
|
|
|
@ -2333,8 +2333,7 @@ static void skge_show_addr(struct net_device *dev)
|
|||
dev->name, netdev_addr(dev));
|
||||
}
|
||||
|
||||
static int skge_probe(struct pci_device *pdev,
|
||||
const struct pci_device_id *ent __unused)
|
||||
static int skge_probe(struct pci_device *pdev)
|
||||
{
|
||||
struct net_device *dev, *dev1;
|
||||
struct skge_hw *hw;
|
||||
|
|
|
@ -2264,8 +2264,7 @@ static struct net_device_operations sky2_operations = {
|
|||
.irq = sky2_net_irq
|
||||
};
|
||||
|
||||
static int sky2_probe(struct pci_device *pdev,
|
||||
const struct pci_device_id *ent __unused)
|
||||
static int sky2_probe(struct pci_device *pdev)
|
||||
{
|
||||
struct net_device *dev;
|
||||
struct sky2_hw *hw;
|
||||
|
|
|
@ -575,7 +575,7 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
/* BASE is used throughout to address the card */
|
||||
BASE = pci->ioaddr;
|
||||
printf(" sundance.c: Found %s Vendor=0x%hX Device=0x%hX\n",
|
||||
pci->driver_name, pci->vendor, pci->device);
|
||||
pci->id->name, pci->vendor, pci->device);
|
||||
|
||||
/* Get the MAC Address by reading the EEPROM */
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
@ -597,7 +597,7 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
/* point to private storage */
|
||||
sdc = &sdx;
|
||||
|
||||
sdc->nic_name = pci->driver_name;
|
||||
sdc->nic_name = pci->id->name;
|
||||
sdc->mtu = mtu;
|
||||
|
||||
pci_read_config_byte(pci, PCI_REVISION_ID, &sdc->pci_rev_id);
|
||||
|
@ -605,7 +605,8 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
DBG ( "Device revision id: %hx\n", sdc->pci_rev_id );
|
||||
|
||||
/* Print out some hardware info */
|
||||
DBG ( "%s: %s at ioaddr %hX, ", pci->driver_name, nic->node_addr, (unsigned int) BASE);
|
||||
DBG ( "%s: %s at ioaddr %hX, ",
|
||||
pci->id->name, nic->node_addr, (unsigned int) BASE);
|
||||
|
||||
sdc->mii_preamble_required = 0;
|
||||
if (1) {
|
||||
|
|
|
@ -810,7 +810,7 @@ static int tlan_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
|
||||
priv->vendor_id = pci->vendor;
|
||||
priv->dev_id = pci->device;
|
||||
priv->nic_name = pci->driver_name;
|
||||
priv->nic_name = pci->id->name;
|
||||
priv->eoc = 0;
|
||||
|
||||
err = 0;
|
||||
|
@ -821,10 +821,10 @@ static int tlan_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
(u8 *) & nic->node_addr[i]);
|
||||
if (err) {
|
||||
printf ( "TLAN: %s: Error reading MAC from eeprom: %d\n",
|
||||
pci->driver_name, err);
|
||||
pci->id->name, err);
|
||||
} else {
|
||||
DBG ( "%s: %s at ioaddr %#lX, ",
|
||||
pci->driver_name, eth_ntoa ( nic->node_addr ), pci->ioaddr );
|
||||
pci->id->name, eth_ntoa ( nic->node_addr ), pci->ioaddr );
|
||||
}
|
||||
|
||||
priv->tlanRev = TLan_DioRead8(BASE, TLAN_DEF_REVISION);
|
||||
|
|
|
@ -1191,7 +1191,7 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) {
|
|||
|
||||
tp->vendor_id = pci->vendor;
|
||||
tp->dev_id = pci->device;
|
||||
tp->nic_name = pci->driver_name;
|
||||
tp->nic_name = pci->id->name;
|
||||
|
||||
tp->if_port = 0;
|
||||
tp->default_port = 0;
|
||||
|
|
|
@ -675,7 +675,7 @@ static int velocity_probe( struct nic *nic, struct pci_device *pci)
|
|||
struct mac_regs *regs;
|
||||
|
||||
printf("via-velocity.c: Found %s Vendor=0x%hX Device=0x%hX\n",
|
||||
pci->driver_name, pci->vendor, pci->device);
|
||||
pci->id->name, pci->vendor, pci->device);
|
||||
|
||||
/* point to private storage */
|
||||
vptr = &vptx;
|
||||
|
@ -707,10 +707,10 @@ static int velocity_probe( struct nic *nic, struct pci_device *pci)
|
|||
for (i = 0; i < 6; i++)
|
||||
nic->node_addr[i] = readb(®s->PAR[i]);
|
||||
|
||||
DBG ( "%s: %s at ioaddr %#hX\n", pci->driver_name, eth_ntoa ( nic->node_addr ),
|
||||
DBG ( "%s: %s at ioaddr %#hX\n", pci->id->name, eth_ntoa ( nic->node_addr ),
|
||||
(unsigned int) BASE );
|
||||
|
||||
velocity_get_options(&vptr->options, 0, pci->driver_name);
|
||||
velocity_get_options(&vptr->options, 0, pci->id->name);
|
||||
|
||||
/*
|
||||
* Mask out the options cannot be set to the chip
|
||||
|
|
|
@ -344,8 +344,7 @@ static struct net_device_operations virtnet_operations = {
|
|||
* @v id PCI ID
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
static int virtnet_probe ( struct pci_device *pci,
|
||||
const struct pci_device_id *id __unused ) {
|
||||
static int virtnet_probe ( struct pci_device *pci ) {
|
||||
unsigned long ioaddr = pci->ioaddr;
|
||||
struct net_device *netdev;
|
||||
struct virtnet_nic *virtnet;
|
||||
|
|
|
@ -495,7 +495,7 @@ vxge_device_unregister(struct __vxge_hw_device *hldev)
|
|||
*
|
||||
*/
|
||||
static int
|
||||
vxge_probe(struct pci_device *pdev, const struct pci_device_id *id __unused)
|
||||
vxge_probe(struct pci_device *pdev)
|
||||
{
|
||||
struct __vxge_hw_device *hldev;
|
||||
enum vxge_hw_status status;
|
||||
|
|
|
@ -312,8 +312,8 @@ struct pci_device {
|
|||
* field.
|
||||
*/
|
||||
void *priv;
|
||||
/** Driver name */
|
||||
const char *driver_name;
|
||||
/** Driver device ID */
|
||||
struct pci_device_id *id;
|
||||
};
|
||||
|
||||
/** A PCI driver */
|
||||
|
@ -326,11 +326,9 @@ struct pci_driver {
|
|||
* Probe device
|
||||
*
|
||||
* @v pci PCI device
|
||||
* @v id Matching entry in ID table
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int ( * probe ) ( struct pci_device *pci,
|
||||
const struct pci_device_id *id );
|
||||
int ( * probe ) ( struct pci_device *pci );
|
||||
/**
|
||||
* Remove device
|
||||
*
|
||||
|
|
|
@ -85,8 +85,7 @@ void legacy_remove ( void *hwdev,
|
|||
|
||||
#define PCI_DRIVER(_name,_ids,_class) \
|
||||
static inline int \
|
||||
_name ## _pci_legacy_probe ( struct pci_device *pci, \
|
||||
const struct pci_device_id *id ); \
|
||||
_name ## _pci_legacy_probe ( struct pci_device *pci ); \
|
||||
static inline void \
|
||||
_name ## _pci_legacy_remove ( struct pci_device *pci ); \
|
||||
struct pci_driver _name __pci_driver = { \
|
||||
|
@ -211,8 +210,7 @@ static inline void * legacy_isa_get_drvdata ( void *hwdev ) {
|
|||
_unsafe_disable ( nic, hwdev ); \
|
||||
} \
|
||||
static inline int \
|
||||
_name ## _pci_legacy_probe ( struct pci_device *pci, \
|
||||
const struct pci_device_id *id __unused ) { \
|
||||
_name ## _pci_legacy_probe ( struct pci_device *pci ) { \
|
||||
return legacy_probe ( pci, legacy_pci_set_drvdata, \
|
||||
&pci->dev, _name ## _probe, \
|
||||
_name ## _disable ); \
|
||||
|
|
Loading…
Reference in New Issue