Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330588
b: refs/heads/master
c: e80e9af
h: refs/heads/master
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 4, 2012
1 parent 6b7006c commit 42e8b56
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19ec2728d77e75b9f44188f356f5ca2f6d7ff165
refs/heads/master: e80e9af3086674bdd2d65c09557c7d0df8f30f99
9 changes: 1 addition & 8 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ struct dvb_usb_device_properties {
struct module *owner;
short *adapter_nr;

#define DVB_USB_IS_AN_I2C_ADAPTER 0x01
int caps;

int size_of_priv;

const char *firmware;
Expand Down Expand Up @@ -330,8 +327,6 @@ struct dvb_usb_adapter {

int active_fe;
int num_frontends_initialized;

void *priv;
};

/**
Expand Down Expand Up @@ -379,16 +374,14 @@ struct dvb_usb_device {
struct mutex i2c_mutex;
struct i2c_adapter i2c_adap;

int num_adapters_initialized;
int num_adapters_initialized;
struct dvb_usb_adapter adapter[MAX_NO_OF_ADAPTER_PER_DEVICE];

/* remote control */
struct rc_dev *rc_dev;
struct input_dev *input_dev;
char rc_phys[64];
struct delayed_work rc_query_work;
u32 last_event;
int last_state;

void *priv;
};
Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d)
{
int ret = 0;

if (!(d->props.caps & DVB_USB_IS_AN_I2C_ADAPTER))
if (!d->props.i2c_algo)
return 0;

if (d->props.i2c_algo == NULL) {
err("no i2c algorithm specified");
return -EINVAL;
}

strlcpy(d->i2c_adap.name, d->name, sizeof(d->i2c_adap.name));
d->i2c_adap.algo = d->props.i2c_algo;
d->i2c_adap.algo_data = NULL;
Expand Down
10 changes: 1 addition & 9 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,6 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d)
adap->max_feed_count = adap->props.pid_filter_count;
}

if (adap->props.size_of_priv > 0) {
adap->priv = kzalloc(adap->props.size_of_priv, GFP_KERNEL);
if (adap->priv == NULL) {
err("no memory for priv for adapter %d.", n);
return -ENOMEM;
}
}

ret = dvb_usb_adapter_stream_init(adap);
if (ret)
return ret;
Expand Down Expand Up @@ -178,7 +170,7 @@ static int dvb_usb_adapter_exit(struct dvb_usb_device *d)
dvb_usb_adapter_frontend_exit(&d->adapter[n]);
dvb_usb_adapter_dvb_exit(&d->adapter[n]);
dvb_usb_adapter_stream_exit(&d->adapter[n]);
kfree(d->adapter[n].priv);

}
d->num_adapters_initialized = 0;
d->state &= ~DVB_USB_STATE_DVB;
Expand Down

0 comments on commit 42e8b56

Please sign in to comment.