Commit c21b6a8d authored by Stephen Hemminger's avatar Stephen Hemminger

[IRDA]: irlap_open should take const string.

irlap_open should take a constant string because it copies
its argument.  Therefore, irtty_net_open doesn't have to make
a copy!
parent bd07d52e
......@@ -907,7 +907,6 @@ static int irtty_net_open(struct net_device *dev)
{
struct irtty_cb *self = (struct irtty_cb *) dev->priv;
struct tty_struct *tty = self->tty;
char hwname[16];
ASSERT(self != NULL, return -1;);
ASSERT(self->magic == IRTTY_MAGIC, return -1;);
......@@ -920,14 +919,11 @@ static int irtty_net_open(struct net_device *dev)
/* Make sure we can receive more data */
irtty_stop_receiver(self, FALSE);
/* Give self a hardware name */
sprintf(hwname, "%s", tty->name);
/*
* Open new IrLAP layer instance, now that everything should be
* initialized properly
*/
self->irlap = irlap_open(dev, &self->qos, hwname);
self->irlap = irlap_open(dev, &self->qos, tty->name);
return 0;
}
......
......@@ -209,7 +209,7 @@ void irda_device_cleanup(void);
* We declare them here to avoid the driver pulling a whole bunch stack
* headers they don't really need - Jean II */
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
char * hw_name);
const char *hw_name);
void irlap_close(struct irlap_cb *self);
/* Interface to be uses by IrLAP */
......
......@@ -217,7 +217,7 @@ int irlap_init(void);
void irlap_cleanup(void);
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
char * hw_name);
const char *hw_name);
void irlap_close(struct irlap_cb *self);
void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
......
......@@ -110,7 +110,7 @@ void __exit irlap_cleanup(void)
*
*/
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
char * hw_name)
const char *hw_name)
{
struct irlap_cb *self;
......
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