Skip to content

Commit bfa4d09

Browse files
committed
More minor SDCA bug fixes
Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>: Just some minor SDCA bug fixes and some minor structure reordering to improve the padding.
2 parents 9004a45 + ec630c2 commit bfa4d09

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

include/sound/sdca_function.h

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,27 +1063,30 @@ struct sdca_entity_ge {
10631063
/**
10641064
* struct sdca_entity_hide - information specific to HIDE Entities
10651065
* @hid: HID device structure
1066-
* @hidtx_ids: HIDTx Report ID
10671066
* @num_hidtx_ids: number of HIDTx Report ID
1068-
* @hidrx_ids: HIDRx Report ID
10691067
* @num_hidrx_ids: number of HIDRx Report ID
1070-
* @hide_reside_function_num: indicating which Audio Function Numbers within this Device
1071-
* @max_delay: the maximum time in microseconds allowed for the Device to change the ownership from Device to Host
1072-
* @af_number_list: which Audio Function Numbers within this Device are sending/receiving the messages in this HIDE
1073-
* @hid_desc: HID descriptor for the HIDE Entity
1068+
* @hidtx_ids: HIDTx Report ID
1069+
* @hidrx_ids: HIDRx Report ID
1070+
* @af_number_list: which Audio Function Numbers within this Device are
1071+
* sending/receiving the messages in this HIDE
1072+
* @hide_reside_function_num: indicating which Audio Function Numbers
1073+
* within this Device
1074+
* @max_delay: the maximum time in microseconds allowed for the Device
1075+
* to change the ownership from Device to Host
10741076
* @hid_report_desc: HID Report Descriptor for the HIDE Entity
1077+
* @hid_desc: HID descriptor for the HIDE Entity
10751078
*/
10761079
struct sdca_entity_hide {
10771080
struct hid_device *hid;
10781081
unsigned int *hidtx_ids;
1079-
int num_hidtx_ids;
10801082
unsigned int *hidrx_ids;
1083+
int num_hidtx_ids;
10811084
int num_hidrx_ids;
1085+
unsigned int af_number_list[SDCA_MAX_FUNCTION_COUNT];
10821086
unsigned int hide_reside_function_num;
10831087
unsigned int max_delay;
1084-
unsigned int af_number_list[SDCA_MAX_FUNCTION_COUNT];
1085-
struct hid_descriptor hid_desc;
10861088
unsigned char *hid_report_desc;
1089+
struct hid_descriptor hid_desc;
10871090
};
10881091

10891092
/**

sound/soc/sdca/sdca_interrupts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static irqreturn_t detected_mode_handler(int irq, void *data)
155155
SDCA_CTL_SELECTED_MODE_NAME);
156156

157157
if (!name)
158-
return -ENOMEM;
158+
return IRQ_NONE;
159159

160160
kctl = snd_soc_component_get_kcontrol(component, name);
161161
if (!kctl) {

sound/soc/sdca/sdca_regmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ int sdca_regmap_mbq_size(struct sdca_function_data *function, unsigned int reg)
196196

197197
control = function_find_control(function, reg);
198198
if (!control)
199-
return false;
199+
return -EINVAL;
200200

201201
return clamp_val(control->nbits / BITS_PER_BYTE, sizeof(u8), sizeof(u32));
202202
}

0 commit comments

Comments
 (0)