nubus: Rename struct nubus_dev
It is misleading to call a functional resource a "device". In adopting the Linux Driver Model, the struct device will be embedded in struct nubus_board. That will compound the terminlogy problem because drivers will bind with boards, not with functional resources. Avoid this by renaming struct nubus_dev as struct nubus_rsrc. "Functional resource" is the vendor's terminology so this helps avoid confusion. Cc: "David S. Miller" <davem@davemloft.net> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Tested-by: Stan Johnson <userm57@yahoo.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:

committed by
Geert Uytterhoeven

parent
2f7dd07eca
commit
189e19e8cb
@@ -123,7 +123,8 @@ enum mac8390_access {
|
||||
};
|
||||
|
||||
extern int mac8390_memtest(struct net_device *dev);
|
||||
static int mac8390_initdev(struct net_device *dev, struct nubus_dev *ndev,
|
||||
static int mac8390_initdev(struct net_device *dev,
|
||||
struct nubus_rsrc *ndev,
|
||||
enum mac8390_type type);
|
||||
|
||||
static int mac8390_open(struct net_device *dev);
|
||||
@@ -169,11 +170,11 @@ static void word_memcpy_tocard(unsigned long tp, const void *fp, int count);
|
||||
static void word_memcpy_fromcard(void *tp, unsigned long fp, int count);
|
||||
static u32 mac8390_msg_enable;
|
||||
|
||||
static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
|
||||
static enum mac8390_type __init mac8390_ident(struct nubus_rsrc *fres)
|
||||
{
|
||||
switch (dev->dr_sw) {
|
||||
switch (fres->dr_sw) {
|
||||
case NUBUS_DRSW_3COM:
|
||||
switch (dev->dr_hw) {
|
||||
switch (fres->dr_hw) {
|
||||
case NUBUS_DRHW_APPLE_SONIC_NB:
|
||||
case NUBUS_DRHW_APPLE_SONIC_LC:
|
||||
case NUBUS_DRHW_SONNET:
|
||||
@@ -184,7 +185,7 @@ static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
|
||||
break;
|
||||
|
||||
case NUBUS_DRSW_APPLE:
|
||||
switch (dev->dr_hw) {
|
||||
switch (fres->dr_hw) {
|
||||
case NUBUS_DRHW_ASANTE_LC:
|
||||
return MAC8390_NONE;
|
||||
case NUBUS_DRHW_CABLETRON:
|
||||
@@ -201,7 +202,7 @@ static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
|
||||
case NUBUS_DRSW_TECHWORKS:
|
||||
case NUBUS_DRSW_DAYNA2:
|
||||
case NUBUS_DRSW_DAYNA_LC:
|
||||
if (dev->dr_hw == NUBUS_DRHW_CABLETRON)
|
||||
if (fres->dr_hw == NUBUS_DRHW_CABLETRON)
|
||||
return MAC8390_CABLETRON;
|
||||
else
|
||||
return MAC8390_APPLE;
|
||||
@@ -212,7 +213,7 @@ static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
|
||||
break;
|
||||
|
||||
case NUBUS_DRSW_KINETICS:
|
||||
switch (dev->dr_hw) {
|
||||
switch (fres->dr_hw) {
|
||||
case NUBUS_DRHW_INTERLAN:
|
||||
return MAC8390_INTERLAN;
|
||||
default:
|
||||
@@ -225,8 +226,8 @@ static enum mac8390_type __init mac8390_ident(struct nubus_dev *dev)
|
||||
* These correspond to Dayna Sonic cards
|
||||
* which use the macsonic driver
|
||||
*/
|
||||
if (dev->dr_hw == NUBUS_DRHW_SMC9194 ||
|
||||
dev->dr_hw == NUBUS_DRHW_INTERLAN)
|
||||
if (fres->dr_hw == NUBUS_DRHW_SMC9194 ||
|
||||
fres->dr_hw == NUBUS_DRHW_INTERLAN)
|
||||
return MAC8390_NONE;
|
||||
else
|
||||
return MAC8390_DAYNA;
|
||||
@@ -289,7 +290,8 @@ static int __init mac8390_memsize(unsigned long membase)
|
||||
return i * 0x1000;
|
||||
}
|
||||
|
||||
static bool __init mac8390_init(struct net_device *dev, struct nubus_dev *ndev,
|
||||
static bool __init mac8390_init(struct net_device *dev,
|
||||
struct nubus_rsrc *ndev,
|
||||
enum mac8390_type cardtype)
|
||||
{
|
||||
struct nubus_dir dir;
|
||||
@@ -394,7 +396,7 @@ static bool __init mac8390_init(struct net_device *dev, struct nubus_dev *ndev,
|
||||
struct net_device * __init mac8390_probe(int unit)
|
||||
{
|
||||
struct net_device *dev;
|
||||
struct nubus_dev *ndev = NULL;
|
||||
struct nubus_rsrc *ndev = NULL;
|
||||
int err = -ENODEV;
|
||||
struct ei_device *ei_local;
|
||||
|
||||
@@ -489,7 +491,7 @@ static const struct net_device_ops mac8390_netdev_ops = {
|
||||
};
|
||||
|
||||
static int __init mac8390_initdev(struct net_device *dev,
|
||||
struct nubus_dev *ndev,
|
||||
struct nubus_rsrc *ndev,
|
||||
enum mac8390_type type)
|
||||
{
|
||||
static u32 fwrd4_offsets[16] = {
|
||||
|
Reference in New Issue
Block a user