mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Samuelson <peter@cadcamlab.org>
To: cmedia <cltien@cmedia.com.tw>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux driver for c-media cm8x38 ver 4.12 released
Date: Thu, 23 Nov 2000 03:39:48 -0600	[thread overview]
Message-ID: <20001123033948.R2918@wire.cadcamlab.org> (raw)
In-Reply-To: <3A1C62AA.5D4579B3@cmedia.com.tw>
In-Reply-To: <3A1C62AA.5D4579B3@cmedia.com.tw>; from cltien@cmedia.com.tw on Wed, Nov 22, 2000 at 07:19:54PM -0500


[ChenLi Tien, from http://members.home.net/puresoft/cmedia.html]
> - *      Copyright (C) 1999  ChenLi Tien (cltien@home.com)
> - *
> - *	Based on the PCI drivers by Thomas Sailer (sailer@ife.ee.ethz.ch)
> + *      Copyright (C) 1999  ChenLi Tien (cltien@cmedia.com.tw)
> + *      		    C-media support (support@cmedia.com.tw)

This is somewhat impolite -- unless the driver is *not* actually based
on Tom's work.

> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
> +	owner:		THIS_MODULE,
> +#endif
>  	llseek:		cm_llseek,
>  	ioctl:		cm_ioctl_mixdev,
>  	open:		cm_open_mixdev,
>  	release:	cm_release_mixdev,
> +#else
> +	&cm_llseek,
> +	NULL,  /* read */
> +	NULL,  /* write */
> +	NULL,  /* readdir */
> +	NULL,  /* poll */
> +	&cm_ioctl_mixdev,
> +	NULL,  /* mmap */
> +	&cm_open_mixdev,
> +	NULL,	/* flush */
> +	&cm_release_mixdev,
> +	NULL,  /* fsync */
> +	NULL,  /* fasync */
> +	NULL,  /* check_media_change */
> +	NULL,  /* revalidate */
> +	NULL,  /* lock */
> +#endif

I don't think the (2,3,0) ifdef is necessary.  Just use the labeled
initializers for all kernels.  See also cm_audio_fops, cm_dsp_fops,
cm_midi_fops, cm_dmfm_fops.

> +#ifdef MODULE
> +MODULE_PARM(mpu_io, "i");
> +MODULE_PARM(fm_io, "i");
> +MODULE_PARM(spdif_inverse, "i");
> +MODULE_PARM(spdif_loop, "i");
> +MODULE_PARM(four_sp, "i");
> +MODULE_PARM(rear_out, "i");
> +MODULE_PARM(modem, "i");
> +MODULE_PARM(joystick, "i");
>  #endif

No need for '#ifdef MODULE'.

> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
> +static int __init init_cmpci(void)
> +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
> +#ifdef MODULE
> +int __init init_module(void)
> +#else
>  int __init init_cmpci(void)
>  #endif
> +#else
> +#ifdef MODULE
> +__initfunc(int init_module(void))
> +#else
> +__initfunc(int init_cmpci(void))
> +#endif
> +#endif

__init is fine in 2.2, no need for conditional __initfunc().

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-11-23 10:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-23  0:19 cmedia
2000-11-23  9:39 ` Peter Samuelson [this message]
2000-11-23 13:20   ` cmedia
2000-11-23 14:27     ` Peter Samuelson
2000-11-28  1:59       ` cmedia

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=20001123033948.R2918@wire.cadcamlab.org \
    --to=peter@cadcamlab.org \
    --cc=cltien@cmedia.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®