Home
last modified time | relevance | path

Searched hist:"920 f1e4a" (Results 1 – 3 of 3) sorted by relevance

/openbmc/linux/drivers/media/usb/em28xx/
H A Dem28xx-core.c920f1e4a Sat Sep 13 03:52:21 CDT 2014 Frank Schaefer <fschaefer.oss@googlemail.com> [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode

Field has_audio in struct em28xx_audio_mode is used together with value
EM28XX_NO_AC97 of field ac97 to determine the internal type of audio
(none/i2s/ac97). This makes the code difficult to understand:

!audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio
!audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG
audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio
audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio

Simplify the whole thing by introducing an enum em28xx_int_audio_type
which describes the internal audio type (none, ac97, i2s) and is hooked
directly to the device struct. Then get rid of field has_audio in struct
em28xx_audio_mode.

A follow-up patch will then remove struct em28xx_ac97_mode and finally
the whole struct em28xx_audio_mode.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
920f1e4a Sat Sep 13 03:52:21 CDT 2014 Frank Schaefer <fschaefer.oss@googlemail.com> [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode

Field has_audio in struct em28xx_audio_mode is used together with value
EM28XX_NO_AC97 of field ac97 to determine the internal type of audio
(none/i2s/ac97). This makes the code difficult to understand:

!audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio
!audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG
audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio
audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio

Simplify the whole thing by introducing an enum em28xx_int_audio_type
which describes the internal audio type (none, ac97, i2s) and is hooked
directly to the device struct. Then get rid of field has_audio in struct
em28xx_audio_mode.

A follow-up patch will then remove struct em28xx_ac97_mode and finally
the whole struct em28xx_audio_mode.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
H A Dem28xx.h920f1e4a Sat Sep 13 03:52:21 CDT 2014 Frank Schaefer <fschaefer.oss@googlemail.com> [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode

Field has_audio in struct em28xx_audio_mode is used together with value
EM28XX_NO_AC97 of field ac97 to determine the internal type of audio
(none/i2s/ac97). This makes the code difficult to understand:

!audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio
!audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG
audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio
audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio

Simplify the whole thing by introducing an enum em28xx_int_audio_type
which describes the internal audio type (none, ac97, i2s) and is hooked
directly to the device struct. Then get rid of field has_audio in struct
em28xx_audio_mode.

A follow-up patch will then remove struct em28xx_ac97_mode and finally
the whole struct em28xx_audio_mode.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
920f1e4a Sat Sep 13 03:52:21 CDT 2014 Frank Schaefer <fschaefer.oss@googlemail.com> [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode

Field has_audio in struct em28xx_audio_mode is used together with value
EM28XX_NO_AC97 of field ac97 to determine the internal type of audio
(none/i2s/ac97). This makes the code difficult to understand:

!audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio
!audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG
audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio
audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio

Simplify the whole thing by introducing an enum em28xx_int_audio_type
which describes the internal audio type (none, ac97, i2s) and is hooked
directly to the device struct. Then get rid of field has_audio in struct
em28xx_audio_mode.

A follow-up patch will then remove struct em28xx_ac97_mode and finally
the whole struct em28xx_audio_mode.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
H A Dem28xx-video.c920f1e4a Sat Sep 13 03:52:21 CDT 2014 Frank Schaefer <fschaefer.oss@googlemail.com> [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode

Field has_audio in struct em28xx_audio_mode is used together with value
EM28XX_NO_AC97 of field ac97 to determine the internal type of audio
(none/i2s/ac97). This makes the code difficult to understand:

!audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio
!audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG
audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio
audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio

Simplify the whole thing by introducing an enum em28xx_int_audio_type
which describes the internal audio type (none, ac97, i2s) and is hooked
directly to the device struct. Then get rid of field has_audio in struct
em28xx_audio_mode.

A follow-up patch will then remove struct em28xx_ac97_mode and finally
the whole struct em28xx_audio_mode.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
920f1e4a Sat Sep 13 03:52:21 CDT 2014 Frank Schaefer <fschaefer.oss@googlemail.com> [media] em28xx: get rid of field has_audio in struct em28xx_audio_mode

Field has_audio in struct em28xx_audio_mode is used together with value
EM28XX_NO_AC97 of field ac97 to determine the internal type of audio
(none/i2s/ac97). This makes the code difficult to understand:

!audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio
!audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG
audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio
audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio

Simplify the whole thing by introducing an enum em28xx_int_audio_type
which describes the internal audio type (none, ac97, i2s) and is hooked
directly to the device struct. Then get rid of field has_audio in struct
em28xx_audio_mode.

A follow-up patch will then remove struct em28xx_ac97_mode and finally
the whole struct em28xx_audio_mode.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>