Commit f4f980fb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] pc300_drv build fix

From: Adrian Bunk <bunk@fs.tum.de>

Fix compile error introduced by the HDLC update.
parent 10aeaa6e
...@@ -2554,10 +2554,10 @@ int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ...@@ -2554,10 +2554,10 @@ int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
case SIOCGPC300CONF: case SIOCGPC300CONF:
#ifdef CONFIG_PC300_MLPPP #ifdef CONFIG_PC300_MLPPP
if (conf->proto != PC300_PROTO_MLPPP) { if (conf->proto != PC300_PROTO_MLPPP) {
conf->proto = hdlc->proto; conf->proto = hdlc->proto.id;
} }
#else #else
conf->proto = hdlc->proto; conf->proto = hdlc->proto.id;
#endif #endif
memcpy(&conf_aux.conf, conf, sizeof(pc300chconf_t)); memcpy(&conf_aux.conf, conf, sizeof(pc300chconf_t));
memcpy(&conf_aux.hw, &card->hw, sizeof(pc300hw_t)); memcpy(&conf_aux.hw, &card->hw, sizeof(pc300hw_t));
...@@ -2590,12 +2590,12 @@ int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) ...@@ -2590,12 +2590,12 @@ int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
} }
} else { } else {
memcpy(conf, &conf_aux.conf, sizeof(pc300chconf_t)); memcpy(conf, &conf_aux.conf, sizeof(pc300chconf_t));
hdlc->proto = conf->proto; hdlc->proto.id = conf->proto;
} }
} }
#else #else
memcpy(conf, &conf_aux.conf, sizeof(pc300chconf_t)); memcpy(conf, &conf_aux.conf, sizeof(pc300chconf_t));
hdlc->proto = conf->proto; hdlc->proto.id = conf->proto;
#endif #endif
return 0; return 0;
case SIOCGPC300STATUS: case SIOCGPC300STATUS:
...@@ -3153,12 +3153,12 @@ int cpc_open(struct net_device *dev) ...@@ -3153,12 +3153,12 @@ int cpc_open(struct net_device *dev)
printk("pc300: cpc_open"); printk("pc300: cpc_open");
#endif #endif
if (hdlc->proto == IF_PROTO_PPP) { if (hdlc->proto.id == IF_PROTO_PPP) {
d->if_ptr = &hdlc->state.ppp.pppdev; d->if_ptr = &hdlc->state.ppp.pppdev;
} }
result = hdlc_open(hdlc); result = hdlc_open(hdlc);
if (hdlc->proto == IF_PROTO_PPP) { if (hdlc->proto.id == IF_PROTO_PPP) {
dev->priv = d; dev->priv = d;
} }
if (result) { if (result) {
...@@ -3191,7 +3191,7 @@ int cpc_close(struct net_device *dev) ...@@ -3191,7 +3191,7 @@ int cpc_close(struct net_device *dev)
CPC_UNLOCK(card, flags); CPC_UNLOCK(card, flags);
hdlc_close(hdlc); hdlc_close(hdlc);
if (hdlc->proto == IF_PROTO_PPP) { if (hdlc->proto.id == IF_PROTO_PPP) {
d->if_ptr = NULL; d->if_ptr = NULL;
} }
#ifdef CONFIG_PC300_MLPPP #ifdef CONFIG_PC300_MLPPP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment