From: linux@audioscience.com
To: patch@alsa-project.org
Cc: tiwai@suse.de,
Eliot Blennerhassett <eblennerhassett@audioscience.com>,
alsa-devel@alsa-project.org
Subject: [snd-asihpi 8/8] Minor cleanups including %pR to print resource.
Date: Fri, 01 Apr 2011 15:59:52 +1300 [thread overview]
Message-ID: <1301626792-13705-9-git-send-email-linux@audioscience.com> (raw)
In-Reply-To: <1301626792-13705-1-git-send-email-linux@audioscience.com>
From: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
---
pci/asihpi/hpi_internal.h | 2 --
pci/asihpi/hpicmn.c | 9 +++++++--
pci/asihpi/hpicmn.h | 2 ++
pci/asihpi/hpioctl.c | 9 +++------
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/pci/asihpi/hpi_internal.h b/pci/asihpi/hpi_internal.h
index d829a65..4fab159 100644
--- a/pci/asihpi/hpi_internal.h
+++ b/pci/asihpi/hpi_internal.h
@@ -1583,9 +1583,7 @@ void hpi_stream_response_to_legacy(struct hpi_stream_res *pSR);
/*////////////////////////////////////////////////////////////////////////// */
/* declarations for individual HPI entry points */
-hpi_handler_func HPI_1000;
hpi_handler_func HPI_6000;
hpi_handler_func HPI_6205;
-hpi_handler_func HPI_COMMON;
#endif /* _HPI_INTERNAL_H_ */
diff --git a/pci/asihpi/hpicmn.c b/pci/asihpi/hpicmn.c
index 0428f28..b15a02e 100644
--- a/pci/asihpi/hpicmn.c
+++ b/pci/asihpi/hpicmn.c
@@ -227,8 +227,9 @@ static unsigned int control_cache_alloc_check(struct hpi_control_cache *pC)
if (info->control_type) {
pC->p_info[info->control_index] = info;
cached++;
- } else /* dummy cache entry */
+ } else { /* dummy cache entry */
pC->p_info[info->control_index] = NULL;
+ }
byte_count += info->size_in32bit_words * 4;
@@ -298,7 +299,7 @@ struct pad_ofs_size {
unsigned int field_size;
};
-static struct pad_ofs_size pad_desc[] = {
+static const struct pad_ofs_size pad_desc[] = {
HPICMN_PAD_OFS_AND_SIZE(c_channel), /* HPI_PAD_CHANNEL_NAME */
HPICMN_PAD_OFS_AND_SIZE(c_artist), /* HPI_PAD_ARTIST */
HPICMN_PAD_OFS_AND_SIZE(c_title), /* HPI_PAD_TITLE */
@@ -617,6 +618,10 @@ void hpi_cmn_control_cache_sync_to_msg(struct hpi_control_cache *p_cache,
}
}
+/** Allocate control cache.
+
+\return Cache pointer, or NULL if allocation fails.
+*/
struct hpi_control_cache *hpi_alloc_control_cache(const u32 control_count,
const u32 size_in_bytes, u8 *p_dsp_control_buffer)
{
diff --git a/pci/asihpi/hpicmn.h b/pci/asihpi/hpicmn.h
index 590f0b6..d53cdf6 100644
--- a/pci/asihpi/hpicmn.h
+++ b/pci/asihpi/hpicmn.h
@@ -60,3 +60,5 @@ void hpi_cmn_control_cache_sync_to_msg(struct hpi_control_cache *pC,
struct hpi_message *phm, struct hpi_response *phr);
u16 hpi_validate_response(struct hpi_message *phm, struct hpi_response *phr);
+
+hpi_handler_func HPI_COMMON;
diff --git a/pci/asihpi/hpioctl.c b/pci/asihpi/hpioctl.c
index 844295e..14bbb94 100644
--- a/pci/asihpi/hpioctl.c
+++ b/pci/asihpi/hpioctl.c
@@ -312,7 +312,7 @@ out:
int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
const struct pci_device_id *pci_id)
{
- int err, idx, nm;
+ int idx, nm;
unsigned int memlen;
struct hpi_message hm;
struct hpi_response hr;
@@ -346,11 +346,8 @@ int __devinit asihpi_adapter_probe(struct pci_dev *pci_dev,
nm = HPI_MAX_ADAPTER_MEM_SPACES;
for (idx = 0; idx < nm; idx++) {
- HPI_DEBUG_LOG(INFO, "resource %d %s %08llx-%08llx %04llx\n",
- idx, pci_dev->resource[idx].name,
- (unsigned long long)pci_resource_start(pci_dev, idx),
- (unsigned long long)pci_resource_end(pci_dev, idx),
- (unsigned long long)pci_resource_flags(pci_dev, idx));
+ HPI_DEBUG_LOG(INFO, "resource %d %pR\n", idx,
+ &pci_dev->resource[idx]);
if (pci_resource_flags(pci_dev, idx) & IORESOURCE_MEM) {
memlen = pci_resource_len(pci_dev, idx);
--
1.7.0.4
prev parent reply other threads:[~2011-04-01 2:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 2:59 [snd-asihpi 0/8] Updates to snd-asihpi driver linux
2011-04-01 2:59 ` [snd-asihpi 1/8] Clock source is neither capture nor playback. Add spaces to control name string for consistency linux
2011-04-01 13:09 ` Takashi Iwai
2011-04-04 23:58 ` Eliot Blennerhassett
2011-04-05 5:22 ` Takashi Iwai
2011-04-01 2:59 ` [snd-asihpi 2/8] Debug print full substream ID. Other minor debug print updates linux
2011-04-01 2:59 ` [snd-asihpi 3/8] More forgiving handling of card playback drained status linux
2011-04-01 2:59 ` [snd-asihpi 4/8] Allow older non DMA capable cards to use MMAP. Emulate the DMA using read and write functions, get rid of copy & silence callbacks that were used only by older cards linux
2011-04-01 2:59 ` [snd-asihpi 5/8] Remove 2 unused functions linux
2011-04-01 2:59 ` [snd-asihpi 6/8] Define pcm_debug_name if CONFIG_SND_DEBUG linux
2011-04-01 2:59 ` [snd-asihpi 7/8] Replace subsys_delete_adapter with adapter_delete This allows some special-case code to be removed linux
2011-04-01 2:59 ` linux [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1301626792-13705-9-git-send-email-linux@audioscience.com \
--to=linux@audioscience.com \
--cc=alsa-devel@alsa-project.org \
--cc=eblennerhassett@audioscience.com \
--cc=patch@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).