aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/falcon.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2009-11-23 11:05:12 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-24 13:58:42 -0500
commit278c0621fbc4ef52177969edb6f07352da816fdb (patch)
tree1af11fc3f69948a0687df279255c754f5671bd99 /drivers/net/sfc/falcon.c
parent981fc1b4b8cc6bfe8c6f0c07052e25738d959c68 (diff)
sfc: Make board information explicitly Falcon-specific
Rename struct efx_board to struct falcon_board. Introduce and use inline function to look up board info from struct efx_nic, in preparation for moving it. Move board init and fini calls into NIC probe and remove functions. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r--drivers/net/sfc/falcon.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index 865638b035bf..29e79f77b732 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -2877,8 +2877,17 @@ int falcon_probe_nic(struct efx_nic *efx)
2877 if (rc) 2877 if (rc)
2878 goto fail5; 2878 goto fail5;
2879 2879
2880 rc = falcon_board(efx)->init(efx);
2881 if (rc) {
2882 EFX_ERR(efx, "failed to initialise board\n");
2883 goto fail6;
2884 }
2885
2880 return 0; 2886 return 0;
2881 2887
2888 fail6:
2889 BUG_ON(i2c_del_adapter(&efx->i2c_adap));
2890 memset(&efx->i2c_adap, 0, sizeof(efx->i2c_adap));
2882 fail5: 2891 fail5:
2883 falcon_remove_spi_devices(efx); 2892 falcon_remove_spi_devices(efx);
2884 falcon_free_buffer(efx, &efx->irq_status); 2893 falcon_free_buffer(efx, &efx->irq_status);
@@ -3070,6 +3079,8 @@ void falcon_remove_nic(struct efx_nic *efx)
3070 struct falcon_nic_data *nic_data = efx->nic_data; 3079 struct falcon_nic_data *nic_data = efx->nic_data;
3071 int rc; 3080 int rc;
3072 3081
3082 falcon_board(efx)->fini(efx);
3083
3073 /* Remove I2C adapter and clear it in preparation for a retry */ 3084 /* Remove I2C adapter and clear it in preparation for a retry */
3074 rc = i2c_del_adapter(&efx->i2c_adap); 3085 rc = i2c_del_adapter(&efx->i2c_adap);
3075 BUG_ON(rc); 3086 BUG_ON(rc);