Changeset 446


Ignore:
Timestamp:
Jun 8, 2009, 11:00:24 PM (16 years ago)
Author:
Paul Smedley
Message:

Add definitions for iminor() and imajor() - remove OS/2 specific hacks for these functions

Location:
GPL/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/core/control.c

    r445 r446  
    5151        int err;
    5252
    53 #ifndef TARGET_OS2
    5453        card = snd_lookup_minor_data(iminor(inode), SNDRV_DEVICE_TYPE_CONTROL);
    55 #else
    56         card = snd_lookup_minor_data(MINOR(inode->i_rdev), SNDRV_DEVICE_TYPE_CONTROL);
    57 #endif
    5854        if (!card) {
    5955                err = -ENODEV;
  • GPL/trunk/alsa-kernel/core/hwdep.c

    r445 r446  
    8585static int snd_hwdep_open(struct inode *inode, struct file * file)
    8686{
    87 #ifndef TARGET_OS2
    8887        int major = imajor(inode);
    89 #else
    90         int major = MAJOR(inode->i_rdev);
    91 #endif
    9288        struct snd_hwdep *hw;
    9389        int err;
     
    9591
    9692        if (major == snd_major) {
    97 #ifndef TARGET_OS2
    9893                hw = snd_lookup_minor_data(iminor(inode),
    99 #else
    100                 hw = snd_lookup_minor_data(MINOR(inode->i_rdev),
    101 #endif
    10294                                           SNDRV_DEVICE_TYPE_HWDEP);
    10395#ifdef CONFIG_SND_OSSEMUL
    10496        } else if (major == SOUND_MAJOR) {
    105 #ifndef TARGET_OS2
    10697                hw = snd_lookup_oss_minor_data(iminor(inode),
    107 #else
    108                 hw = snd_lookup_oss_minor_data(MINOR(inode->i_rdev),
    109 #endif
    11098                                               SNDRV_OSS_DEVICE_TYPE_DMFM);
    11199#endif
  • GPL/trunk/alsa-kernel/core/oss/mixer_oss.c

    r445 r446  
    4444        int err;
    4545
    46 #ifndef TARGET_OS2
    4746        card = snd_lookup_oss_minor_data(iminor(inode),
    48 #else
    49         card = snd_lookup_oss_minor_data(MINOR(inode->i_rdev),
    50 #endif
    5147                                         SNDRV_OSS_DEVICE_TYPE_MIXER);
    5248        if (card == NULL)
  • GPL/trunk/alsa-kernel/core/oss/pcm_oss.c

    r445 r446  
    23832383        wait_queue_t wait;
    23842384
    2385 #ifndef TARGET_OS2
    23862385        pcm = snd_lookup_oss_minor_data(iminor(inode),
    2387 #else
    2388         pcm = snd_lookup_oss_minor_data(MINOR(inode->i_rdev),
    2389 #endif
    23902386                                        SNDRV_OSS_DEVICE_TYPE_PCM);
    23912387        if (pcm == NULL) {
     
    24212417        while (1) {
    24222418                err = snd_pcm_oss_open_file(file, pcm, &pcm_oss_file,
    2423 #ifndef TARGET_OS2
    24242419                                            iminor(inode), setup);
    2425 #else
    2426                                             MINOR(inode->i_rdev), setup);
    2427 #endif
    24282420                if (err >= 0)
    24292421                        break;
  • GPL/trunk/alsa-kernel/core/pcm_native.c

    r445 r446  
    21032103        struct snd_pcm *pcm;
    21042104
    2105 #ifndef TARGET_OS2
    21062105        pcm = snd_lookup_minor_data(iminor(inode),
    2107 #else
    2108         pcm = snd_lookup_minor_data(MINOR(inode->i_rdev),
    2109 #endif
    21102106                                    SNDRV_DEVICE_TYPE_PCM_PLAYBACK);
    21112107        return snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK);
     
    21162112        struct snd_pcm *pcm;
    21172113
    2118 #ifndef TARGET_OS2
    21192114        pcm = snd_lookup_minor_data(iminor(inode),
    2120 #else
    2121         pcm = snd_lookup_minor_data(MINOR(inode->i_rdev),
    2122 #endif
    21232115                                    SNDRV_DEVICE_TYPE_PCM_CAPTURE);
    21242116        return snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE);
  • GPL/trunk/alsa-kernel/core/rawmidi.c

    r445 r446  
    375375static int snd_rawmidi_open(struct inode *inode, struct file *file)
    376376{
    377 #ifndef TARGET_OS2
    378377        int maj = imajor(inode);
    379 #else
    380         int maj = MAJOR(inode->i_rdev);
    381 #endif
    382378        struct snd_card *card;
    383379        int subdevice;
     
    393389
    394390        if (maj == snd_major) {
    395 #ifndef TARGET_OS2
    396391                rmidi = snd_lookup_minor_data(iminor(inode),
    397 #else
    398                 rmidi = snd_lookup_minor_data(MINOR(inode->i_rdev),
    399 #endif
    400392                                              SNDRV_DEVICE_TYPE_RAWMIDI);
    401393#ifdef CONFIG_SND_OSSEMUL
    402394        } else if (maj == SOUND_MAJOR) {
    403 #ifndef TARGET_OS2
    404395                rmidi = snd_lookup_oss_minor_data(iminor(inode),
    405 #else
    406                 rmidi = snd_lookup_oss_minor_data(MINOR(inode->i_rdev),
    407 #endif
    408396                                                  SNDRV_OSS_DEVICE_TYPE_MIDI);
    409397#endif
  • GPL/trunk/alsa-kernel/core/sound.c

    r445 r446  
    123123static int __snd_open(struct inode *inode, struct file *file)
    124124{
    125 #ifndef TARGET_OS2
    126125        unsigned int minor = iminor(inode);
    127 #else
    128         unsigned int minor = MINOR(inode->i_rdev);
    129 #endif
    130126        struct snd_minor *mptr = NULL;
    131127#ifndef TARGET_OS2
  • GPL/trunk/include/linux/fs.h

    r445 r446  
    267267#define fops_get(x) (x)
    268268#define fops_put(x) do { ; } while (0)
     269
     270#define minor(a) MINOR(a)
     271#define major(a) MAJOR(a)
     272#define iminor(x) minor((x)->i_rdev)
    269273#define imajor(x) major((x)->i_rdev)
    270274
Note: See TracChangeset for help on using the changeset viewer.