static void subsys_message(struct hpi_message *phm, struct hpi_response *phr) { switch (phm->function) { case HPI_SUBSYS_CREATE_ADAPTER: subsys_create_adapter(phm, phr); break; default: phr->error = HPI_ERROR_INVALID_FUNC; break; } }
static void subsys_message(struct hpi_message *phm, struct hpi_response *phr) { switch (phm->function) { case HPI_SUBSYS_OPEN: case HPI_SUBSYS_CLOSE: case HPI_SUBSYS_GET_INFO: case HPI_SUBSYS_DRIVER_UNLOAD: case HPI_SUBSYS_DRIVER_LOAD: case HPI_SUBSYS_FIND_ADAPTERS: /* messages that should not get here */ phr->error = HPI_ERROR_UNIMPLEMENTED; break; case HPI_SUBSYS_CREATE_ADAPTER: subsys_create_adapter(phm, phr); break; case HPI_SUBSYS_DELETE_ADAPTER: subsys_delete_adapter(phm, phr); break; default: phr->error = HPI_ERROR_INVALID_FUNC; break; } }