ALSA: asihpi - Give more meaningful name to hpi request message type
authorEliot Blennerhassett <eblennerhassett@audioscience.com>
Fri, 22 Jul 2011 03:52:36 +0000 (15:52 +1200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 22 Jul 2011 05:45:06 +0000 (07:45 +0200)
Having a 'request message' makes more sense than a 'message message'

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/asihpi/hpi6000.c
sound/pci/asihpi/hpi6205.c
sound/pci/asihpi/hpi_internal.h
sound/pci/asihpi/hpicmn.c
sound/pci/asihpi/hpimsginit.c
sound/pci/asihpi/hpimsgx.c

index df4aed5295dddd33526c12051691456c8800a900..c8db36e909792ce5b45e8c6f4ba318d589413b17 100644 (file)
@@ -359,7 +359,7 @@ void HPI_6000(struct hpi_message *phm, struct hpi_response *phr)
                        HPI_ERROR_PROCESSING_MESSAGE);
 
        switch (phm->type) {
-       case HPI_TYPE_MESSAGE:
+       case HPI_TYPE_REQUEST:
                switch (phm->object) {
                case HPI_OBJ_SUBSYSTEM:
                        subsys_message(phm, phr);
@@ -538,7 +538,7 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao,
 
                HPI_DEBUG_LOG(VERBOSE, "send ADAPTER_GET_INFO\n");
                memset(&hm, 0, sizeof(hm));
-               hm.type = HPI_TYPE_MESSAGE;
+               hm.type = HPI_TYPE_REQUEST;
                hm.size = sizeof(struct hpi_message);
                hm.object = HPI_OBJ_ADAPTER;
                hm.function = HPI_ADAPTER_GET_INFO;
index 9d5df54a6b46f4e67c99dd8d2cbdc47ba479f0e0..faff9e3777982531825e1094646462c86e38c936 100644 (file)
@@ -392,7 +392,7 @@ void _HPI_6205(struct hpi_adapter_obj *pao, struct hpi_message *phm,
 
        HPI_DEBUG_LOG(VERBOSE, "start of switch\n");
        switch (phm->type) {
-       case HPI_TYPE_MESSAGE:
+       case HPI_TYPE_REQUEST:
                switch (phm->object) {
                case HPI_OBJ_SUBSYSTEM:
                        subsys_message(pao, phm, phr);
@@ -634,11 +634,12 @@ static u16 create_adapter_obj(struct hpi_adapter_obj *pao,
 
                HPI_DEBUG_LOG(VERBOSE, "init ADAPTER_GET_INFO\n");
                memset(&hm, 0, sizeof(hm));
-               hm.type = HPI_TYPE_MESSAGE;
+               /* wAdapterIndex == version == 0 */
+               hm.type = HPI_TYPE_REQUEST;
                hm.size = sizeof(hm);
                hm.object = HPI_OBJ_ADAPTER;
                hm.function = HPI_ADAPTER_GET_INFO;
-               hm.adapter_index = 0;
+
                memset(&hr, 0, sizeof(hr));
                hr.size = sizeof(hr);
 
index bf5eced76bacefb4b5d077a75134fc76ded8c65e..ce5d7cda6dad2627af3b437e21533fa5294607dd 100644 (file)
@@ -364,7 +364,7 @@ Used in DLL to indicate device not present
 #define HPI_ADAPTER_ASI(f)   (f)
 
 enum HPI_MESSAGE_TYPES {
-       HPI_TYPE_MESSAGE = 1,
+       HPI_TYPE_REQUEST = 1,
        HPI_TYPE_RESPONSE = 2,
        HPI_TYPE_DATA = 3,
        HPI_TYPE_SSX2BYPASS_MESSAGE = 4
index b15a02e91f824aac1d68b50851bd8a0091ebd6c8..801dcd89c86ed7752346c7e7cdc8d3ef35f18707 100644 (file)
@@ -682,7 +682,7 @@ static void subsys_message(struct hpi_message *phm, struct hpi_response *phr)
 void HPI_COMMON(struct hpi_message *phm, struct hpi_response *phr)
 {
        switch (phm->type) {
-       case HPI_TYPE_MESSAGE:
+       case HPI_TYPE_REQUEST:
                switch (phm->object) {
                case HPI_OBJ_SUBSYSTEM:
                        subsys_message(phm, phr);
index 628376ce4a4989456ce9170fee2f63d41f1969a0..52400a6b5f15abf1f3e757a81a3f8f438a4cf712 100644 (file)
@@ -46,7 +46,7 @@ static void hpi_init_message(struct hpi_message *phm, u16 object,
        if (gwSSX2_bypass)
                phm->type = HPI_TYPE_SSX2BYPASS_MESSAGE;
        else
-               phm->type = HPI_TYPE_MESSAGE;
+               phm->type = HPI_TYPE_REQUEST;
        phm->object = object;
        phm->function = function;
        phm->version = 0;
@@ -89,7 +89,7 @@ static void hpi_init_messageV1(struct hpi_message_header *phm, u16 size,
        memset(phm, 0, sizeof(*phm));
        if ((object > 0) && (object <= HPI_OBJ_MAXINDEX)) {
                phm->size = size;
-               phm->type = HPI_TYPE_MESSAGE;
+               phm->type = HPI_TYPE_REQUEST;
                phm->object = object;
                phm->function = function;
                phm->version = 1;
index 7352a5f7b4f7ca50fa048d63cf730e1a804a8206..111f774f5f20f874b28a1b9c7fe7865497dc015b 100644 (file)
@@ -315,7 +315,7 @@ void hpi_send_recv_ex(struct hpi_message *phm, struct hpi_response *phr,
 {
        HPI_DEBUG_MESSAGE(DEBUG, phm);
 
-       if (phm->type != HPI_TYPE_MESSAGE) {
+       if (phm->type != HPI_TYPE_REQUEST) {
                hpi_init_response(phr, phm->object, phm->function,
                        HPI_ERROR_INVALID_TYPE);
                return;