Skip to content

Commit

Permalink
[PATCH] dvb: remove unnecessary casts in dvb-core
Browse files Browse the repository at this point in the history
remove unnecessary casts in dvb-core (Kenneth Aafloy)

Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Johannes Stezenbach authored and Linus Torvalds committed May 17, 2005
1 parent 2d4f2c2 commit 0c53c70
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 72 deletions.
32 changes: 16 additions & 16 deletions drivers/media/dvb/dvb-core/dmxdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ static inline void dvb_dmxdev_dvr_state_set(struct dmxdev_dvr *dmxdevdvr, int st

static int dvb_dvr_open(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev=(struct dvb_device *) file->private_data;
struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
struct dmx_frontend *front;

dprintk ("function : %s\n", __FUNCTION__);
Expand Down Expand Up @@ -224,8 +224,8 @@ static int dvb_dvr_open(struct inode *inode, struct file *file)

static int dvb_dvr_release(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev=(struct dvb_device *) file->private_data;
struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;

if (down_interruptible (&dmxdev->mutex))
return -ERESTARTSYS;
Expand All @@ -252,8 +252,8 @@ static int dvb_dvr_release(struct inode *inode, struct file *file)
static ssize_t dvb_dvr_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct dvb_device *dvbdev=(struct dvb_device *) file->private_data;
struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
int ret;

if (!dmxdev->demux->write)
Expand All @@ -270,8 +270,8 @@ static ssize_t dvb_dvr_write(struct file *file, const char __user *buf,
static ssize_t dvb_dvr_read(struct file *file, char __user *buf, size_t count,
loff_t *ppos)
{
struct dvb_device *dvbdev=(struct dvb_device *) file->private_data;
struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
int ret;

//down(&dmxdev->mutex);
Expand Down Expand Up @@ -345,7 +345,7 @@ static int dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len,
const u8 *buffer2, size_t buffer2_len,
struct dmx_section_filter *filter, enum dmx_success success)
{
struct dmxdev_filter *dmxdevfilter=(struct dmxdev_filter *) filter->priv;
struct dmxdev_filter *dmxdevfilter = filter->priv;
int ret;

if (dmxdevfilter->buffer.error) {
Expand Down Expand Up @@ -381,7 +381,7 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
const u8 *buffer2, size_t buffer2_len,
struct dmx_ts_feed *feed, enum dmx_success success)
{
struct dmxdev_filter *dmxdevfilter=(struct dmxdev_filter *) feed->priv;
struct dmxdev_filter *dmxdevfilter = feed->priv;
struct dmxdev_buffer *buffer;
int ret;

Expand Down Expand Up @@ -684,8 +684,8 @@ static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)

static int dvb_demux_open(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev=(struct dvb_device *) file->private_data;
struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
int i;
struct dmxdev_filter *dmxdevfilter;

Expand Down Expand Up @@ -1013,8 +1013,8 @@ static struct dvb_device dvbdev_demux = {
static int dvb_dvr_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *parg)
{
struct dvb_device *dvbdev=(struct dvb_device *) file->private_data;
struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;

int ret=0;

Expand Down Expand Up @@ -1044,8 +1044,8 @@ static int dvb_dvr_ioctl(struct inode *inode, struct file *file,

static unsigned int dvb_dvr_poll (struct file *file, poll_table *wait)
{
struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
struct dmxdev *dmxdev = (struct dmxdev *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dmxdev *dmxdev = dvbdev->priv;
unsigned int mask = 0;

dprintk ("function : %s\n", __FUNCTION__);
Expand Down
38 changes: 19 additions & 19 deletions drivers/media/dvb/dvb-core/dvb_ca_en50221.c
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_camready_irq);
*/
void dvb_ca_en50221_camchange_irq(struct dvb_ca_en50221 *pubca, int slot, int change_type)
{
struct dvb_ca_private *ca = (struct dvb_ca_private *) pubca->private;
struct dvb_ca_private *ca = pubca->private;

dprintk("CAMCHANGE IRQ slot:%i change_type:%i\n", slot, change_type);

Expand Down Expand Up @@ -857,7 +857,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_frda_irq);
*/
void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot)
{
struct dvb_ca_private *ca = (struct dvb_ca_private *) pubca->private;
struct dvb_ca_private *ca = pubca->private;

dprintk("CAMREADY IRQ slot:%i\n", slot);

Expand All @@ -876,7 +876,7 @@ void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot)
*/
void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *pubca, int slot)
{
struct dvb_ca_private *ca = (struct dvb_ca_private *) pubca->private;
struct dvb_ca_private *ca = pubca->private;
int flags;

dprintk("FR/DA IRQ slot:%i\n", slot);
Expand Down Expand Up @@ -993,7 +993,7 @@ static void dvb_ca_en50221_thread_update_delay(struct dvb_ca_private *ca)
*/
static int dvb_ca_en50221_thread(void *data)
{
struct dvb_ca_private *ca = (struct dvb_ca_private *) data;
struct dvb_ca_private *ca = data;
char name[15];
int slot;
int flags;
Expand Down Expand Up @@ -1202,8 +1202,8 @@ static int dvb_ca_en50221_thread(void *data)
static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *parg)
{
struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err = 0;
int slot;

Expand All @@ -1225,7 +1225,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file,
break;

case CA_GET_CAP: {
struct ca_caps *caps = (struct ca_caps *) parg;
struct ca_caps *caps = parg;

caps->slot_num = ca->slot_count;
caps->slot_type = CA_CI_LINK;
Expand All @@ -1235,7 +1235,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file,
}

case CA_GET_SLOT_INFO: {
struct ca_slot_info *info = (struct ca_slot_info *) parg;
struct ca_slot_info *info = parg;

if ((info->num > ca->slot_count) || (info->num < 0))
return -EINVAL;
Expand Down Expand Up @@ -1291,8 +1291,8 @@ static int dvb_ca_en50221_io_ioctl(struct inode *inode, struct file *file,
static ssize_t dvb_ca_en50221_io_write(struct file *file,
const char __user * buf, size_t count, loff_t * ppos)
{
struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
u8 slot, connection_id;
int status;
char fragbuf[HOST_LINK_BUF_SIZE];
Expand Down Expand Up @@ -1428,8 +1428,8 @@ static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca, int *resu
static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user * buf,
size_t count, loff_t * ppos)
{
struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int status;
int result = 0;
u8 hdr[2];
Expand Down Expand Up @@ -1526,8 +1526,8 @@ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user * buf,
*/
static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err;
int i;

Expand Down Expand Up @@ -1569,8 +1569,8 @@ static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file)
*/
static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
int err = 0;

dprintk("%s\n", __FUNCTION__);
Expand All @@ -1597,8 +1597,8 @@ static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file)
*/
static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table * wait)
{
struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
struct dvb_ca_private *ca = (struct dvb_ca_private *) dvbdev->priv;
struct dvb_device *dvbdev = file->private_data;
struct dvb_ca_private *ca = dvbdev->priv;
unsigned int mask = 0;
int slot;
int result = 0;
Expand Down Expand Up @@ -1750,7 +1750,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_release);
*/
void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca)
{
struct dvb_ca_private *ca = (struct dvb_ca_private *) pubca->private;
struct dvb_ca_private *ca = pubca->private;
int i;

dprintk("%s\n", __FUNCTION__);
Expand Down
34 changes: 17 additions & 17 deletions drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ struct dvb_frontend_private {

static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
{
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
struct dvb_fe_events *events = &fepriv->events;
struct dvb_frontend_event *e;
int wp;
Expand Down Expand Up @@ -155,7 +155,7 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
static int dvb_frontend_get_event(struct dvb_frontend *fe,
struct dvb_frontend_event *event, int flags)
{
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
struct dvb_fe_events *events = &fepriv->events;

dprintk ("%s\n", __FUNCTION__);
Expand Down Expand Up @@ -234,7 +234,7 @@ static int dvb_frontend_autotune(struct dvb_frontend *fe, int check_wrapped)
{
int autoinversion;
int ready = 0;
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
int original_inversion = fepriv->parameters.inversion;
u32 original_frequency = fepriv->parameters.frequency;

Expand Down Expand Up @@ -321,7 +321,7 @@ static int dvb_frontend_autotune(struct dvb_frontend *fe, int check_wrapped)

static int dvb_frontend_is_exiting(struct dvb_frontend *fe)
{
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;

if (fepriv->exit)
return 1;
Expand All @@ -335,7 +335,7 @@ static int dvb_frontend_is_exiting(struct dvb_frontend *fe)

static int dvb_frontend_should_wakeup(struct dvb_frontend *fe)
{
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;

if (fepriv->wakeup) {
fepriv->wakeup = 0;
Expand All @@ -346,7 +346,7 @@ static int dvb_frontend_should_wakeup(struct dvb_frontend *fe)

static void dvb_frontend_wakeup(struct dvb_frontend *fe)
{
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;

fepriv->wakeup = 1;
wake_up_interruptible(&fepriv->wait_queue);
Expand All @@ -357,8 +357,8 @@ static void dvb_frontend_wakeup(struct dvb_frontend *fe)
*/
static int dvb_frontend_thread(void *data)
{
struct dvb_frontend *fe = (struct dvb_frontend *) data;
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend *fe = data;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
unsigned long timeout;
char name [15];
int quality = 0, delay = 3*HZ;
Expand Down Expand Up @@ -520,7 +520,7 @@ static int dvb_frontend_thread(void *data)
static void dvb_frontend_stop(struct dvb_frontend *fe)
{
unsigned long ret;
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;

dprintk ("%s\n", __FUNCTION__);

Expand Down Expand Up @@ -559,7 +559,7 @@ static void dvb_frontend_stop(struct dvb_frontend *fe)
static int dvb_frontend_start(struct dvb_frontend *fe)
{
int ret;
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;

dprintk ("%s\n", __FUNCTION__);

Expand Down Expand Up @@ -597,7 +597,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv;
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
int err = -EOPNOTSUPP;

dprintk ("%s\n", __FUNCTION__);
Expand All @@ -615,7 +615,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,

switch (cmd) {
case FE_GET_INFO: {
struct dvb_frontend_info* info = (struct dvb_frontend_info*) parg;
struct dvb_frontend_info* info = parg;
memcpy(info, &fe->ops->info, sizeof(struct dvb_frontend_info));

/* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't
Expand Down Expand Up @@ -793,7 +793,7 @@ static unsigned int dvb_frontend_poll(struct file *file, struct poll_table_struc
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv;
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;

dprintk ("%s\n", __FUNCTION__);

Expand All @@ -809,7 +809,7 @@ static int dvb_frontend_open(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv;
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
int ret;

dprintk ("%s\n", __FUNCTION__);
Expand All @@ -833,7 +833,7 @@ static int dvb_frontend_release(struct inode *inode, struct file *file)
{
struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv;
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;

dprintk ("%s\n", __FUNCTION__);

Expand Down Expand Up @@ -873,7 +873,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb,
up(&frontend_mutex);
return -ENOMEM;
}
fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
fepriv = fe->frontend_priv;
memset(fe->frontend_priv, 0, sizeof(struct dvb_frontend_private));

init_MUTEX (&fepriv->sem);
Expand All @@ -897,7 +897,7 @@ EXPORT_SYMBOL(dvb_register_frontend);

int dvb_unregister_frontend(struct dvb_frontend* fe)
{
struct dvb_frontend_private *fepriv = (struct dvb_frontend_private*) fe->frontend_priv;
struct dvb_frontend_private *fepriv = fe->frontend_priv;
dprintk ("%s\n", __FUNCTION__);

down (&frontend_mutex);
Expand Down
Loading

0 comments on commit 0c53c70

Please sign in to comment.