Changeset 625


Ignore:
Timestamp:
Jan 3, 2021, 7:20:20 AM (5 years ago)
Author:
Paul Smedley
Message:

Code cleanups to simplify future maintenance, update regmap/regcache/rbtree to linux 4.19.163 level

Location:
GPL/branches/uniaud32-next
Files:
4 added
74 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-next/alsa-kernel/core/hwdep.c

    r615 r625  
    55 */
    66
    7 #ifdef TARGET_OS2
    8 #include <sound/core.h>
    9 #endif
    107#include <linux/major.h>
    118#include <linux/init.h>
  • GPL/branches/uniaud32-next/alsa-kernel/core/info.c

    r619 r625  
    232232static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma)
    233233{
    234 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
    235234        struct inode *inode = file_inode(file);
    236 #else
    237         struct inode *inode = file->f_dentry->d_inode;
    238 #endif
    239235        struct snd_info_private_data *data;
    240236        struct snd_info_entry *entry;
     
    479475                return -ENOMEM;
    480476        snd_proc_root->mode = S_IFDIR | 0555;
    481 #ifndef TARGET_OS2
    482477        snd_proc_root->p = proc_mkdir("asound", NULL);
    483 #else
    484         snd_proc_root->p = create_proc_entry("asound", S_IFDIR | S_IRUGO | S_IXUGO, NULL);
    485 #endif
    486478        if (!snd_proc_root->p)
    487479                goto error;
     
    491483                goto error;
    492484#endif
    493 #if IS_ENABLED(CONFIG_SND_SEQUENCER) 
     485#if IS_ENABLED(CONFIG_SND_SEQUENCER)
    494486        snd_seq_root = create_subdir(THIS_MODULE, "seq");
    495487        if (!snd_seq_root)
     
    551543int snd_info_card_register(struct snd_card *card)
    552544{
    553 #ifndef TARGET_OS2
    554545        struct proc_dir_entry *p;
    555 #endif
    556546        int err;
    557547
     
    568558        if (card->proc_root_link)
    569559                return 0;
    570 #ifndef TARGET_OS2
    571560        p = proc_symlink(card->id, snd_proc_root->p, card->proc_root->name);
    572561        if (!p)
    573562                return -ENOMEM;
    574563        card->proc_root_link = p;
    575 #endif
    576564        return 0;
    577565}
     
    587575                card->proc_root_link = NULL;
    588576        }
    589 #ifndef TARGET_OS2
    590577        if (strcmp(card->id, card->proc_root->name))
    591578                card->proc_root_link = proc_symlink(card->id,
    592579                                                    snd_proc_root->p,
    593580                                                    card->proc_root->name);
    594 #endif
    595581        mutex_unlock(&info_mutex);
    596582}
  • GPL/branches/uniaud32-next/alsa-kernel/core/init.c

    r615 r625  
    55 */
    66
    7 #ifdef TARGET_OS2
    8 #include <sound/core.h>
    9 #include <sound/initval.h>
    10 #include <linux/sysfs.h>
    11 struct class *sound_class;
    12 #endif
    137#include <linux/init.h>
    148#include <linux/sched.h>
     
    2620#include <sound/info.h>
    2721
     22#ifdef TARGET_OS2
     23struct class *sound_class;
     24#endif
     25
    2826/* monitor files for graceful shutdown (hotplug) */
    2927struct snd_monitor_file {
     
    5553{
    5654        int match = 1;
    57 #ifndef TARGET_OS2
    5855#ifdef MODULE
    5956        const char *s1, *s2;
     
    8481        }
    8582#endif /* MODULE */
    86 #endif
    8783        return match;
    8884}
     
    229225        card->card_dev.class = sound_class;
    230226        card->card_dev.release = release_card_device;
    231 #ifndef TARGET_OS2
    232227        card->card_dev.groups = card->dev_groups;
    233228        card->dev_groups[0] = &card_dev_attr_group;
     
    235230        if (err < 0)
    236231                goto __error;
     232
    237233        snprintf(card->irq_descr, sizeof(card->irq_descr), "%s:%s",
    238234                 dev_driver_string(card->dev), dev_name(&card->card_dev));
    239 #endif
     235
    240236        /* the control interface cannot be accessed from the user space until */
    241237        /* snd_cards_bitmask and snd_cards are set with snd_card_register */
     
    478474
    479475        spin_lock_irq(&card->files_lock);
    480 #ifndef TARGET_OS2
    481476        wait_event_lock_irq(card->remove_sleep,
    482477                            list_empty(&card->files_list),
    483478                            card->files_lock);
    484 #endif
    485479        spin_unlock_irq(&card->files_lock);
    486480}
     
    548542        if (ret)
    549543                return ret;
    550 #ifndef TARGET_OS2
    551544        /* wait, until all devices are ready for the free operation */
    552545        wait_for_completion(&released);
    553 #endif
    554546        return 0;
    555547}
     
    709701        return count;
    710702}
    711 #endif
    712 
    713 #ifdef NOT_USED
     703
    714704static DEVICE_ATTR(id, 0644, card_id_show_attr, card_id_store_attr);
    715705
     
    1000990                }
    1001991        }
    1002 #ifndef TARGET_OS2
    1003992        if (list_empty(&card->files_list))
    1004993                wake_up_all(&card->remove_sleep);
    1005 #endif
    1006994        spin_unlock(&card->files_lock);
    1007995        if (!found) {
  • GPL/branches/uniaud32-next/alsa-kernel/core/memalloc.c

    r615 r625  
    88
    99#ifdef TARGET_OS2
    10 #include <sound/core.h>
     10#include <sound/config.h> //for CONFIG_HAS_DMA
    1111#endif
    1212#include <linux/slab.h>
  • GPL/branches/uniaud32-next/alsa-kernel/core/misc.c

    r615 r625  
    3131        if (res) {
    3232                release_resource(res);
    33                 kfree_nocheck(res);
     33                kfree(res);
    3434        }
    3535}
  • GPL/branches/uniaud32-next/alsa-kernel/core/oss/pcm_oss.c

    r615 r625  
    14561456                        if (substream->oss.setup.partialfrag ||
    14571457                            runtime->oss.buffer_used == runtime->oss.period_bytes) {
    1458                                 tmp = snd_pcm_oss_write2(substream, runtime->oss.buffer + runtime->oss.period_ptr,
     1458                                tmp = snd_pcm_oss_write2(substream, runtime->oss.buffer + runtime->oss.period_ptr, 
    14591459                                                         runtime->oss.buffer_used - runtime->oss.period_ptr, 1);
    14601460                                if (tmp <= 0)
  • GPL/branches/uniaud32-next/alsa-kernel/core/pcm.c

    r615 r625  
    10301030        return snprintf(buf, PAGE_SIZE, "%s\n", str);
    10311031}
    1032 #endif
    1033 
    1034 #ifndef TARGET_OS2
     1032
    10351033static DEVICE_ATTR(pcm_class, 0444, show_pcm_class, NULL);
    10361034static struct attribute *pcm_dev_attrs[] = {
  • GPL/branches/uniaud32-next/alsa-kernel/core/pcm_lib.c

    r619 r625  
    14081408        if ((snd_interval_value(i) == width) ||
    14091409            (width == 0 && snd_interval_value(i) > msbits))
    1410 #ifdef TARGET_OS2 //fixme
     1410#ifdef TARGET_OS2 //fixme min_not_zero uses typeof()
    14111411                params->msbits = msbits;
    14121412#else
  • GPL/branches/uniaud32-next/alsa-kernel/core/pcm_native.c

    r621 r625  
    19721972
    19731973
    1974 #ifndef TARGET_OS2
    19751974static bool is_pcm_file(struct file *file)
    19761975{
     
    19901989        return true;
    19911990}
    1992 #endif
    19931991
    19941992/*
     
    20112009        if (!f.file)
    20122010                return -EBADFD;
    2013 #ifndef TARGET_OS2
    20142011        if (!is_pcm_file(f.file)) {
    20152012                res = -EBADFD;
    20162013                goto _badf;
    20172014        }
    2018 #endif
    20192015        pcm_file = f.file->private_data;
    20202016        substream1 = pcm_file->substream;
  • GPL/branches/uniaud32-next/alsa-kernel/core/seq/oss/seq_oss_event.c

    r615 r625  
    287287                }
    288288
    289 #ifndef TARGET_OS2
    290289                ch = array_index_nospec(ch, info->nr_voices);
    291 #endif
    292290                if (note == 255 && info->ch[ch].note >= 0) {
    293291                        /* volume control */
     
    350348                }
    351349
    352 #ifndef TARGET_OS2
    353350                ch = array_index_nospec(ch, info->nr_voices);
    354 #endif
    355351                if (info->ch[ch].note >= 0) {
    356352                        note = info->ch[ch].note;
  • GPL/branches/uniaud32-next/alsa-kernel/core/seq/oss/seq_oss_midi.c

    r615 r625  
    304304        if (dev < 0 || dev >= dp->max_mididev)
    305305                return NULL;
    306 #ifndef TARGET_OS2
    307306        dev = array_index_nospec(dev, dp->max_mididev);
    308 #endif
    309307        return get_mdev(dev);
    310308}
  • GPL/branches/uniaud32-next/alsa-kernel/core/seq/oss/seq_oss_synth.c

    r615 r625  
    333333        if (dev < 0 || dev >= dp->max_synthdev)
    334334                return NULL;
    335 #ifndef TARGET_OS2
    336335        dev = array_index_nospec(dev, SNDRV_SEQ_OSS_MAX_SYNTH_DEVS);
    337 #endif
    338336        return &dp->synths[dev];
    339337}
  • GPL/branches/uniaud32-next/alsa-kernel/drivers/mpu401/mpu401.c

    r615 r625  
    66 */
    77
    8 #ifdef TARGET_OS2
    9 #include <sound/config.h>
    10 #endif
    118#include <linux/init.h>
    129#include <linux/pnp.h>
  • GPL/branches/uniaud32-next/alsa-kernel/drivers/opl3/opl3_synth.c

    r615 r625  
    465465        }
    466466        /* Get register offset of operator */
    467 #ifndef TARGET_OS2
    468467        voice_offset = array_index_nospec(voice_offset, MAX_OPL2_VOICES);
    469468        voice_op = array_index_nospec(voice->op, 4);
    470 #endif
    471469        op_offset = snd_opl3_regmap[voice_offset][voice_op];
    472470
  • GPL/branches/uniaud32-next/alsa-kernel/hda/array.c

    r615 r625  
    3535                array->alloced = num;
    3636        }
    37 
    3837        return snd_array_elem(array, array->used++);
    3938}
  • GPL/branches/uniaud32-next/alsa-kernel/hda/hdac_bus.c

    r615 r625  
    158158EXPORT_SYMBOL_GPL(snd_hdac_bus_queue_event);
    159159
    160 #ifdef TARGET_OS2 //was ifndef 2020-11-26
    161160/*
    162161 * process queued unsolicited events
     
    189188        spin_unlock_irq(&bus->reg_lock);
    190189}
    191 #endif
    192190
    193191/**
  • GPL/branches/uniaud32-next/alsa-kernel/hda/hdac_stream.c

    r615 r625  
    44 */
    55
    6 #ifdef TARGET_OS2
    7 #include <linux/types.h>
    8 #endif
    96#include <linux/kernel.h>
    107#include <linux/delay.h>
     
    303300                if (azx_dev->opened)
    304301                        continue;
    305 #ifndef TARGET_OS2
    306302                if (azx_dev->assigned_key == key) {
    307 #else
    308                 if (azx_dev->device == substream->pcm->device) {
    309 #endif
    310303                        res = azx_dev;
    311304                        break;
     
    318311                res->opened = 1;
    319312                res->running = 0;
    320 #ifndef TARGET_OS2
    321313                res->assigned_key = key;
    322 #else
    323                 res->device == substream->pcm->device;
    324 #endif
    325314                res->substream = substream;
    326315                spin_unlock_irq(&bus->reg_lock);
  • GPL/branches/uniaud32-next/alsa-kernel/include/sound/control.h

    r615 r625  
    6464        } tlv;
    6565        unsigned long private_value;
    66 #ifdef TARGET_OS2
    67         void *private_ptr;
    68 #endif
    6966        void *private_data;
    7067        void (*private_free)(struct snd_kcontrol *kcontrol);
     
    143140{
    144141        unsigned int ioff = id->numid - kctl->id.numid;
    145 #ifndef TARGET_OS2
    146142        return array_index_nospec(ioff, kctl->count);
    147 #else
    148         return ioff;
    149 #endif
    150143}
    151144
     
    153146{
    154147        unsigned int ioff = id->index - kctl->id.index;
    155 #ifndef TARGET_OS2
    156148        return array_index_nospec(ioff, kctl->count);
    157 #else
    158         return ioff;
    159 #endif
    160149}
    161150
  • GPL/branches/uniaud32-next/alsa-kernel/include/sound/hda_codec.h

    r615 r625  
    206206        struct list_head conn_list;     /* linked-list of connection-list */
    207207
    208 #ifndef TARGET_OS2
    209208        struct mutex spdif_mutex;
    210 #else
    211         struct semaphore spdif_mutex;
    212 #endif
    213209        struct mutex control_mutex;
    214210        struct snd_array spdif_out;
  • GPL/branches/uniaud32-next/alsa-kernel/include/sound/hdaudio.h

    r622 r625  
    1717#include <sound/hda_verbs.h>
    1818#include <drm/i915_component.h>
    19 #ifdef TARGET_OS2
    20 #include <linux/clocksource.h>
    21 #endif
     19
    2220/* codec node id */
    2321typedef u16 hda_nid_t;
     
    361359        /* locks */
    362360        spinlock_t reg_lock;
    363 #ifndef TARGET_OS2
    364361        struct mutex cmd_mutex;
    365 #else
    366         struct semaphore cmd_mutex;
    367 #endif
    368362        struct mutex lock;
    369363
     
    538532        unsigned char stream_tag;       /* assigned stream */
    539533        unsigned char index;            /* stream index */
    540 #ifndef TARGET_OS2
    541534        int assigned_key;               /* last device# key assigned to */
    542 #else
    543         int device;                     /* last device number assigned to */
    544 #endif
    545535        bool opened:1;
    546536        bool running:1;
  • GPL/branches/uniaud32-next/alsa-kernel/include/sound/initval.h

    r615 r625  
    2222#define MODULE_DEVICES(val)
    2323#define MODULE_PARM_SYNTAX(id, val)
    24 #define module_param_array(name, type, nump, perm)
    25 #define module_param(name, type, perm)
    2624#else
    2725#define MODULE_CLASSES(val) MODULE_GENERIC_STRING(info_classes, val)
  • GPL/branches/uniaud32-next/alsa-kernel/pci/emu10k1/emu10k1_main.c

    r615 r625  
    19261926                (unsigned long)(emu->ptb_pages.addr + emu->ptb_pages.bytes));
    19271927
    1928 #ifndef TARGET_OS2
     1928#ifdef TARGET_OS2
    19291929        emu->page_ptr_table = vmalloc(array_size(sizeof(void *),
    19301930                                                 emu->max_cache_pages));
     
    20912091        if (emu->audigy)
    20922092                size += ARRAY_SIZE(saved_regs_audigy);
    2093 #ifndef TARGET_OS2
     2093#ifdef TARGET_OS2
    20942094        emu->saved_ptr = vmalloc(array3_size(4, NUM_G, size));
    20952095#else
  • GPL/branches/uniaud32-next/alsa-kernel/pci/emu10k1/emufx.c

    r615 r625  
    26852685                return -ENOMEM;
    26862686        len = emu->audigy ? 2 * 1024 : 2 * 512;
    2687 #ifndef TARGET_OS2
     2687#ifdef TARGET_OS2
    26882688        emu->saved_icode = vmalloc(array_size(len, 4));
    26892689#else
  • GPL/branches/uniaud32-next/alsa-kernel/pci/emu10k1/p16v.c

    r615 r625  
    858858int snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu)
    859859{
    860 #ifndef TARGET_OS2
     860#ifdef TARGET_OS2
    861861        emu->p16v_saved = vmalloc(array_size(NUM_CHS * 4, 0x80));
    862862#else
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_controller.c

    r615 r625  
    99 *                     PeiSen Hou <pshou@realtek.com.tw>
    1010 */
    11 
    12 #ifdef TARGET_OS2
    13 #include <linux/delay.h>
    14 #include <linux/interrupt.h>
    15 #include <linux/kernel.h>
    16 #include <linux/module.h>
    17 #include <linux/dma-mapping.h>
    18 #include <linux/moduleparam.h>
    19 #include <linux/init.h>
    20 #include <linux/slab.h>
    21 #include <linux/pci.h>
    22 #include <linux/mutex.h>
    23 #include <linux/reboot.h>
    24 #include <linux/io.h>
    25 #include <linux/pm_runtime.h>
    26 #include <linux/clocksource.h>
    27 #include <linux/time.h>
    28 #include <linux/completion.h>
    29 #include <linux/math64.h>
    30 #endif
    3111
    3212#include <linux/clocksource.h>
     
    13961376                snd_hda_codec_configure(codec);
    13971377        }
     1378
    13981379        if (!azx_bus(chip)->num_codecs)
    13991380                return -ENODEV;
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_generic.c

    r615 r625  
    2727#include "hda_beep.h"
    2828#include "hda_generic.h"
     29
    2930#ifdef TARGET_OS2
    3031#define KBUILD_MODNAME "hda_generic"
     
    52735274
    52745275        free_kctls(spec); /* no longer needed */
     5276
    52755277        err = snd_hda_jack_add_kctls(codec, &spec->autocfg);
    52765278        if (err < 0)
     
    58545856                              aamix_default(codec->spec));
    58555857        set_pin_eapd(codec, pin, path->active);
    5856 
    58575858}
    58585859
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_hwdep.c

    r615 r625  
    4747        } else {
    4848                verb -= codec->core.start_nid;
    49 #ifndef TARGET_OS2
    5049                verb = array_index_nospec(verb, codec->core.num_nodes);
    51 #endif
    5250                res = codec->wcaps[verb];
    5351        }
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_intel.c

    r615 r625  
    3737#include <linux/completion.h>
    3838#ifdef TARGET_OS2
    39 #include <linux/math64.h>
    40 
    4139#define KBUILD_MODNAME "hda_intel"
    4240#endif
     
    5351#include <sound/hda_i915.h>
    5452#include <sound/intel-nhlt.h>
    55 #ifndef TARGET_OS2
    5653#include <linux/vgaarb.h>
    5754#include <linux/vga_switcheroo.h>
    58 #endif
    5955#include <linux/firmware.h>
    6056#include <sound/hda_codec.h>
     
    811807                        "unable to grab IRQ %d, disabling device\n",
    812808                        chip->pci->irq);
    813 #ifndef TARGET_OS2
    814809                if (do_disconnect)
    815810                        snd_card_disconnect(chip->card);
    816 #endif
    817811                return -1;
    818812        }
     
    14011395
    14021396        hda->init_failed = 1; /* to be sure */
    1403 #ifndef TARGET_OS2
    14041397        complete_all(&hda->probe_wait);
    1405 #endif
    14061398
    14071399#ifdef CONFIG_VGA_SWITCHEROO
     
    22102202
    22112203        dev++;
    2212 #ifndef TARGET_OS2
    22132204        if (chip->disabled)
    22142205                complete_all(&hda->probe_wait);
    2215 #endif
    22162206        return 0;
    22172207
     
    23912381        if (!hda->need_i915_power)
    23922382                display_power(chip, false);
    2393 #ifndef TARGET_OS2
    23942383        complete_all(&hda->probe_wait);
    2395 #endif
    23962384        to_hda_bus(bus)->bus_probing = 0;
    23972385        return 0;
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_priv.h

    r615 r625  
    216216        unsigned char stream_tag;       /* assigned stream */
    217217        unsigned char index;            /* stream index */
    218 #ifndef TARGET_OS2
    219218        int assigned_key;               /* last device# key assigned to */
    220 #else
    221         int device;                     /* last device number assigned to */
    222 #endif
    223219
    224220        unsigned int opened:1;
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_proc.c

    r615 r625  
    903903}
    904904
    905 #ifdef CONFIG_PROC_FS
    906905/*
    907906 * create a proc read
     
    914913        return snd_card_ro_proc_new(codec->card, name, codec, print_codec_info);
    915914}
    916 #endif
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/hda_sysfs.c

    r615 r625  
    88 */
    99
    10 #ifdef TARGET_OS2
    11 #include <linux/sysfs.h>
    12 #endif
    1310#include <linux/init.h>
    1411#include <linux/slab.h>
     
    718715int snd_hda_load_patch(struct hda_bus *bus, size_t fw_size, const void *fw_buf)
    719716{
    720 dprintf(("snd_hda_load_patch"));
    721717        char buf[128];
    722718        struct hda_codec *codec;
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_conexant.c

    r615 r625  
    709709
    710710#ifdef TARGET_OS2
    711 static const struct hda_pintbl CXT_PINCFG_COMPAQ_CQ60_PINS[] = {
    712                         /* 0x17 was falsely set up as a mic, it should 0x1d */
    713                         { 0x17, 0x400001f0 },
    714                         { 0x1d, 0x97a70120 },
    715                         {0}
    716                 };
    717 
    718711static const struct hda_pintbl CXT_FIXUP_HEADPHONE_MIC_PIN_PINS[] = {
    719712                        { 0x18, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
     
    737730static const struct hda_pintbl CXT_FIXUP_HP_530_PINS[] = {
    738731                        { 0x12, 0x90a60160 }, /* int mic */
    739                         {0}
    740 };
    741 
    742 static const struct hda_pintbl CXT_FIXUP_HP_SPECTRE_PINS[] = {
    743                         /* enable NID 0x1d for the speaker on top */
    744                         { 0x1d, 0x91170111 },
    745                         {0}
    746 };
    747 
    748 static const struct hda_pintbl CXT_FIXUP_HP_MIC_NO_PRESENCE_PINS[] = {
    749                         { 0x1a, 0x02a1113c },
    750732                        {0}
    751733};
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_sigmatel.c

    r621 r625  
    2929#ifdef TARGET_OS2
    3030#define KBUILD_MODNAME "patch_sigmatel"
    31 // 2020-11-17 SHL
    32 #include <../../../lib32/internal.h>
    3331#endif
    3432
     
    19451943                .v.pins = stac92hd89xx_hp_z1_g2_right_mic_jack_pin_configs,
    19461944        },
    1947 #ifdef TARGET_OS2xxx
    19481945        [STAC_92HD73XX_ASUS_MOBO] = {
    19491946                .type = HDA_FIXUP_PINS,
     1947#ifndef TARGET_OS2
    19501948                .v.pins = (const struct hda_pintbl[]) {
    19511949                        /* enable 5.1 and SPDIF out */
     
    19561954                        {0}
    19571955                }
    1958         },
     1956#else
     1957                .v.pins = STAC_92HD73XX_ASUS_MOBO_PINS,
    19591958#endif
     1959        },
    19601960};
    19611961
  • GPL/branches/uniaud32-next/alsa-kernel/pci/hda/patch_via.c

    r615 r625  
    193193                snd_hda_codec_write(codec, 0x1, 0, 0xf81, 1);
    194194                codec->jackpoll_interval = 0;
    195                 //NOT_USED cancel_delayed_work_sync(&codec->jackpoll_work);
     195                cancel_delayed_work_sync(&codec->jackpoll_work);
    196196                spec->hp_work_active = false;
    197197        }
  • GPL/branches/uniaud32-next/alsa-kernel/pci/intel8x0.c

    r615 r625  
    99 *   for SiS735, so the code is not fully functional.
    1010 *
    11 
    1211 */     
    1312
    1413#ifdef TARGET_OS2
    1514#define KBUILD_MODNAME "intel8x0"
    16 #include <linux/ktime.h>
    17 extern ktime_t ktime_get(void);
    1815#endif
    1916
     
    31823179static int check_default_spdif_aclink(struct pci_dev *pci)
    31833180{
    3184 #ifndef TARGET_OS2
    31853181        const struct snd_pci_quirk *w;
    31863182
     
    31973193                return w->value;
    31983194        }
    3199 #endif
    32003195        return 0;
    32013196}
  • GPL/branches/uniaud32-next/alsa-kernel/pci/maestro3.c

    r615 r625  
    25822582                quirk = snd_pci_quirk_lookup(pci, m3_amp_quirk_list);
    25832583                if (quirk) {
    2584 #ifndef TARGET_OS2
    25852584                        dev_info(card->dev, "set amp-gpio for '%s'\n",
    25862585                                 snd_pci_quirk_name(quirk));
    2587 #endif
    25882586                        chip->amp_gpio = quirk->value;
    25892587                } else if (chip->allegro_flag)
     
    25952593        quirk = snd_pci_quirk_lookup(pci, m3_irda_quirk_list);
    25962594        if (quirk) {
    2597 #ifndef TARGET_OS2
    25982595                dev_info(card->dev, "enabled irda workaround for '%s'\n",
    25992596                         snd_pci_quirk_name(quirk));
    2600 #endif
    26012597                chip->irda_workaround = 1;
    26022598        }
     
    26532649
    26542650#ifdef CONFIG_PM_SLEEP
    2655 #ifndef TARGET_OS2
    26562651        chip->suspend_mem =
    26572652                vmalloc(array_size(sizeof(u16),
    26582653                                   REV_B_CODE_MEMORY_LENGTH +
    26592654                                        REV_B_DATA_MEMORY_LENGTH));
    2660 #else
    2661         chip->suspend_mem = vmalloc(sizeof(u16) * (REV_B_CODE_MEMORY_LENGTH + REV_B_DATA_MEMORY_LENGTH));
    2662 #endif
    26632655        if (chip->suspend_mem == NULL)
    26642656                dev_warn(card->dev, "can't allocate apm buffer\n");
     
    27132705        int err;
    27142706
    2715 #ifndef TARGET_OS2
    27162707        /* don't pick up modems */
    27172708        if (((pci->class >> 8) & 0xffff) != PCI_CLASS_MULTIMEDIA_AUDIO)
    27182709                return -ENODEV;
    2719 #endif
     2710
    27202711        if (dev >= SNDRV_CARDS)
    27212712                return -ENODEV;
  • GPL/branches/uniaud32-next/alsa-kernel/pci/trident/trident_main.c

    r615 r625  
    33513351        trident->tlb.entries_dmaaddr = ALIGN(trident->tlb.buffer.addr, SNDRV_TRIDENT_MAX_PAGES * 4);
    33523352        /* allocate shadow TLB page table (virtual addresses) */
    3353 #ifndef TARGET_OS2
    33543353        trident->tlb.shadow_entries =
    33553354                vmalloc(array_size(SNDRV_TRIDENT_MAX_PAGES,
    33563355                                   sizeof(unsigned long)));
    3357 #else
    3358         trident->tlb.shadow_entries = vmalloc(SNDRV_TRIDENT_MAX_PAGES*sizeof(unsigned long));
    3359 #endif
    33603356        if (!trident->tlb.shadow_entries)
    33613357                return -ENOMEM;
  • GPL/branches/uniaud32-next/include/asm/atomic.h

    r615 r625  
    9292#define atomic_inc_return(v)            atomic_add_return(1, (v))
    9393
     94typedef struct {
     95        long long counter;
     96} atomic64_t;
    9497
     98typedef atomic64_t atomic_long_t;
    9599#endif
  • GPL/branches/uniaud32-next/include/asm/unaligned.h

    r598 r625  
    11#ifndef _ASM_UNALIGNED_H
    22#define _ASM_UNALIGNED_H
    3 
     3#  include <linux/unaligned/le_byteshift.h>
     4#  include <linux/unaligned/be_byteshift.h>
    45#endif
  • GPL/branches/uniaud32-next/include/linux/clocksource.h

    r615 r625  
    11#ifndef _LINUX_CLOCKSOURCE_H
    22#define _LINUX_CLOCKSOURCE_H
     3
     4#include <linux/types.h>
     5
    36/* clocksource cycle base type */
    47typedef u64 cycle_t;
  • GPL/branches/uniaud32-next/include/linux/completion.h

    r615 r625  
    3535
    3636extern void complete(struct completion *);
    37 
     37extern void complete_all(struct completion *);
     38extern void wait_for_completion(struct completion *x);
     39extern bool try_wait_for_completion(struct completion *x);
    3840#endif /* _LINUX_COMPLETION_H */
  • GPL/branches/uniaud32-next/include/linux/device.h

    r622 r625  
    66#include <linux/sysfs.h>
    77#include <linux/lockdep.h>
     8#include <linux/overflow.h>
    89
    910struct device;
     
    291292extern void *devres_find(struct device *dev, dr_release_t release,
    292293                         dr_match_t match, void *match_data);
     294
     295/* debugging and troubleshooting/diagnostic helpers. */
     296extern const char *dev_driver_string(const struct device *dev);
     297
    293298#endif /* _LINUX_DEVICE_H */
    294299
  • GPL/branches/uniaud32-next/include/linux/fs.h

    r615 r625  
    165165        struct dentry           *f_dentry;
    166166        const struct file_operations    *f_op;
     167        struct inode            *f_inode;       /* cached value */
    167168        spinlock_t              f_lock;
    168169        atomic_t                f_count;
     
    182183
    183184struct inode {
    184 #ifdef TARGET_OS2
    185         kdev_t                  i_rdev;
    186         struct semaphore        i_sem;
    187         union {
    188                 void            *generic_ip;
    189         } u;
    190 
    191 #else
    192185         void * i_hash;
    193186         void * i_list;
     
    225218                void                            *generic_ip;
    226219        } u;
    227 #endif
    228220};
    229221
     
    335327#define FMODE_STREAM            (( fmode_t)0x200000)
    336328
     329static inline struct inode *file_inode(const struct file *f)
     330{
     331        return f->f_inode;
     332}
     333
    337334#endif /* _LINUX_FS_H */
  • GPL/branches/uniaud32-next/include/linux/genalloc.h

    r615 r625  
    11#ifndef _LINUX_GENALLOC_H
    22#define _LINUX_GENALLOC_H
     3#include <linux/module.h>
     4#include <linux/types.h>
     5#include <linux/printk.h>
    36
    47#endif /* _LINUX_GENALLOC_H */
  • GPL/branches/uniaud32-next/include/linux/init.h

    r615 r625  
    11#ifndef _LINUX_INIT_H
    22#define _LINUX_INIT_H
     3
     4#include <asm/errno.h>
     5
    36
    47/* These macros are used to mark some functions or
  • GPL/branches/uniaud32-next/include/linux/major.h

    r32 r625  
    11#ifndef _LINUX_MAJOR_H
    22#define _LINUX_MAJOR_H
     3
     4#include <linux/types.h>
    35
    46/*
  • GPL/branches/uniaud32-next/include/linux/mm.h

    r615 r625  
    77#include <asm/page.h>
    88#include <asm/atomic.h>
     9#include <linux/overflow.h>
    910
    1011/*
  • GPL/branches/uniaud32-next/include/linux/module.h

    r615 r625  
    77#ifndef _LINUX_MODULE_H
    88#define _LINUX_MODULE_H
     9
    910#include <linux/moduleparam.h>
     11
    1012/* Poke the use count of a module.  */
    1113
  • GPL/branches/uniaud32-next/include/linux/moduleparam.h

    r615 r625  
    138138                          &__param_arr_##name, perm)
    139139
    140 #ifndef TARGET_OS2
    141 #define module_param_array(name, type, nump, perm)              \
    142         module_param_array_named(name, name, type, nump, perm)
    143 #endif
     140#define module_param_array(name, type, nump, perm)
     141#define module_param(name, type, perm)
    144142extern int param_array_set(const char *val, struct kernel_param *kp);
    145143extern int param_array_get(char *buffer, struct kernel_param *kp);
  • GPL/branches/uniaud32-next/include/linux/mutex.h

    r615 r625  
    33
    44#include <asm/semaphore.h>
     5#include <linux/list.h>
     6
     7struct mutex {
     8        atomic_long_t           owner;
     9        spinlock_t              wait_lock;
     10#ifdef CONFIG_MUTEX_SPIN_ON_OWNER
     11        struct optimistic_spin_queue osq; /* Spinner MCS lock */
     12#endif
     13        struct list_head        wait_list;
     14#ifdef CONFIG_DEBUG_MUTEXES
     15        void                    *magic;
     16#endif
     17#ifdef CONFIG_DEBUG_LOCK_ALLOC
     18        struct lockdep_map      dep_map;
     19#endif
     20};
    521
    622#define mutex semaphore
  • GPL/branches/uniaud32-next/include/linux/pci.h

    r615 r625  
    338338  unsigned short  subsystem_vendor;
    339339  unsigned short  subsystem_device;
    340   unsigned int  _class;   /* 3 bytes: (base,sub,prog-if) */
    341340  u8    hdr_type; /* PCI header type (`multi' flag masked out) */
    342341  u8    rom_base_reg; /* Which config register controls the ROM */
  • GPL/branches/uniaud32-next/include/linux/pm_runtime.h

    r615 r625  
    33
    44#include <asm/errno.h>
     5#include <linux/pm.h>
     6
    57/* Runtime PM flag argument bits */
    68#define RPM_ASYNC               0x01    /* Request is asynchronous */
  • GPL/branches/uniaud32-next/include/linux/proc_fs.h

    r615 r625  
    241241}
    242242static inline void *PDE_DATA(const struct inode *inode) {return NULL;}
     243
     244extern struct proc_dir_entry *proc_symlink(const char *,
     245                struct proc_dir_entry *, const char *);
     246extern struct proc_dir_entry *proc_mkdir(const char *, struct proc_dir_entry *);
    243247#endif /* _LINUX_PROC_FS_H */
  • GPL/branches/uniaud32-next/include/linux/rbtree.h

    r615 r625  
    2626  See Documentation/rbtree.txt for documentation and samples.
    2727*/
    28 /* from 4.14.202 */
     28/* from 4.19.163 */
    2929
    3030#ifndef _LINUX_RBTREE_H
     
    3535//#include <linux/rcupdate.h>
    3636
    37 #ifdef TARGET_OS2
    38 #pragma pack(4)
    39 #endif
    4037struct rb_node {
    4138        unsigned long  __rb_parent_color;
    4239        struct rb_node *rb_right;
    4340        struct rb_node *rb_left;
    44 #ifndef TARGET_OS2
    45 } __attribute__((aligned(sizeof(long))));
    46 #else
    47 };
    48 #pragma pack()
    49 #endif
     41} /*__attribute__((aligned(sizeof(long))))*/;
    5042    /* The alignment might seem pointless, but allegedly CRIS needs it */
    5143
     
    109101extern void rb_replace_node_rcu(struct rb_node *victim, struct rb_node *new,
    110102                                struct rb_root *root);
     103extern void rb_replace_node_cached(struct rb_node *victim, struct rb_node *new,
     104                                   struct rb_root_cached *root);
    111105
    112106static inline void rb_link_node(struct rb_node *node, struct rb_node *parent,
  • GPL/branches/uniaud32-next/include/linux/rbtree_augmented.h

    r615 r625  
    2121  linux/include/linux/rbtree_augmented.h
    2222*/
    23 /* from 4.14.202 */
     23/* from 4.19.163 */
     24
    2425#ifndef _LINUX_RBTREE_AUGMENTED_H
    2526#define _LINUX_RBTREE_AUGMENTED_H
     
    2728#include <linux/compiler.h>
    2829#include <linux/rbtree.h>
     30//#include <linux/rcupdate.h>
    2931
    3032/*
     
    5658 * affected subtrees.
    5759 */
    58 static inline void
     60/*static inline*/ void
    5961rb_insert_augmented(struct rb_node *node, struct rb_root *root,
    6062                    const struct rb_augment_callbacks *augment)
     
    6365}
    6466
    65 static inline void
     67/*static inline*/ void
    6668rb_insert_augmented_cached(struct rb_node *node,
    6769                           struct rb_root_cached *root, bool newleft,
     
    7274}
    7375
    74 #define RB_DECLARE_CALLBACKS(rbstatic, rbname, rbstruct, rbfield,       \
     76#define RB_DECLARE_CALLBACKS(rb/*static*/, rbname, rbstruct, rbfield,   \
    7577                             rbtype, rbaugmented, rbcompute)            \
    76 static inline void                                                      \
     78/*static inline*/ void                                                  \
    7779rbname ## _propagate(struct rb_node *rb, struct rb_node *stop)          \
    7880{                                                                       \
     
    8688        }                                                               \
    8789}                                                                       \
    88 static inline void                                                      \
     90/*static inline*/ void                                                  \
    8991rbname ## _copy(struct rb_node *rb_old, struct rb_node *rb_new)         \
    9092{                                                                       \
     
    9395        new->rbaugmented = old->rbaugmented;                            \
    9496}                                                                       \
    95 static void                                                             \
     97/*static*/ void                                                         \
    9698rbname ## _rotate(struct rb_node *rb_old, struct rb_node *rb_new)       \
    9799{                                                                       \
     
    101103        old->rbaugmented = rbcompute(old);                              \
    102104}                                                                       \
    103 rbstatic const struct rb_augment_callbacks rbname = {                   \
     105rb/*static*/ const struct rb_augment_callbacks rbname = {                       \
    104106        .propagate = rbname ## _propagate,                              \
    105107        .copy = rbname ## _copy,                                        \
     
    120122#define rb_is_black(rb)    __rb_is_black((rb)->__rb_parent_color)
    121123
    122 static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
     124/*static inline*/ void rb_set_parent(struct rb_node *rb, struct rb_node *p)
    123125{
    124126        rb->__rb_parent_color = rb_color(rb) | (unsigned long)p;
    125127}
    126128
    127 static inline void rb_set_parent_color(struct rb_node *rb,
     129/*static inline*/ void rb_set_parent_color(struct rb_node *rb,
    128130                                       struct rb_node *p, int color)
    129131{
     
    131133}
    132134
    133 static inline void
     135/*static inline*/ void
    134136__rb_change_child(struct rb_node *old, struct rb_node *new,
    135137                  struct rb_node *parent, struct rb_root *root)
     
    145147
    146148#ifndef TARGET_OS2
    147 static inline void
     149/*static inline*/ void
    148150__rb_change_child_rcu(struct rb_node *old, struct rb_node *new,
    149151                      struct rb_node *parent, struct rb_root *root)
     
    162164        void (*augment_rotate)(struct rb_node *old, struct rb_node *new));
    163165
    164 static inline struct rb_node *
     166/*static inline*/ struct rb_node *
    165167__rb_erase_augmented(struct rb_node *node, struct rb_root *root,
    166168                     struct rb_node **leftmost,
     
    270272}
    271273
    272 static inline void
     274/*static inline*/ void
    273275rb_erase_augmented(struct rb_node *node, struct rb_root *root,
    274276                   const struct rb_augment_callbacks *augment)
     
    280282}
    281283
    282 static inline void
     284/*static inline*/ void
    283285rb_erase_augmented_cached(struct rb_node *node, struct rb_root_cached *root,
    284286                          const struct rb_augment_callbacks *augment)
  • GPL/branches/uniaud32-next/include/linux/regmap.h

    r615 r625  
    1313 * published by the Free Software Foundation.
    1414 */
    15 /* from 4.14.202 */
     15/* from 4.19.163 */
    1616
    1717#include <linux/list.h>
    1818#include <linux/rbtree.h>
     19#include <linux/ktime.h>
    1920#include <linux/delay.h>
    2021#include <linux/err.h>
     
    2223#include <linux/lockdep.h>
    2324
    24 #define CONFIG_REGMAP
    25 
    2625struct module;
     26struct clk;
    2727struct device;
    2828struct i2c_client;
    2929struct irq_domain;
     30struct slim_device;
    3031struct spi_device;
    3132struct spmi_device;
     
    3435struct regmap_field;
    3536struct snd_ac97;
     37struct sdw_slave;
    3638
    3739/* An enum of all the supported cache types */
     
    124126#define regmap_read_poll_timeout(map, addr, val, cond, sleep_us, timeout_us) \
    125127({ \
    126         ktime_t timeout = ktime_add_us(ktime_get(), timeout_us); \
     128        u64 __timeout_us = (timeout_us); \
     129        unsigned long __sleep_us = (sleep_us); \
     130        ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
     131        int __ret; \
     132        might_sleep_if(__sleep_us); \
     133        for (;;) { \
     134                __ret = regmap_read((map), (addr), &(val)); \
     135                if (__ret) \
     136                        break; \
     137                if (cond) \
     138                        break; \
     139                if ((__timeout_us) && \
     140                    ktime_compare(ktime_get(), __timeout) > 0) { \
     141                        __ret = regmap_read((map), (addr), &(val)); \
     142                        break; \
     143                } \
     144                if (__sleep_us) \
     145                        usleep_range((__sleep_us >> 2) + 1, __sleep_us); \
     146        } \
     147        __ret ?: ((cond) ? 0 : -ETIMEDOUT); \
     148})
     149
     150/**
     151 * regmap_field_read_poll_timeout - Poll until a condition is met or timeout
     152 *
     153 * @field: Regmap field to read from
     154 * @val: Unsigned integer variable to read the value into
     155 * @cond: Break condition (usually involving @val)
     156 * @sleep_us: Maximum time to sleep between reads in us (0
     157 *            tight-loops).  Should be less than ~20ms since usleep_range
     158 *            is used (see Documentation/timers/timers-howto.txt).
     159 * @timeout_us: Timeout in us, 0 means never timeout
     160 *
     161 * Returns 0 on success and -ETIMEDOUT upon a timeout or the regmap_field_read
     162 * error return value in case of a error read. In the two former cases,
     163 * the last read value at @addr is stored in @val. Must not be called
     164 * from atomic context if sleep_us or timeout_us are used.
     165 *
     166 * This is modelled after the readx_poll_timeout macros in linux/iopoll.h.
     167 */
     168#define regmap_field_read_poll_timeout(field, val, cond, sleep_us, timeout_us) \
     169({ \
     170        u64 __timeout_us = (timeout_us); \
     171        unsigned long __sleep_us = (sleep_us); \
     172        ktime_t timeout = ktime_add_us(ktime_get(), __timeout_us); \
    127173        int pollret; \
    128         might_sleep_if(sleep_us); \
     174        might_sleep_if(__sleep_us); \
    129175        for (;;) { \
    130                 pollret = regmap_read((map), (addr), &(val)); \
     176                pollret = regmap_field_read((field), &(val)); \
    131177                if (pollret) \
    132178                        break; \
    133179                if (cond) \
    134180                        break; \
    135                 if (timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \
    136                         pollret = regmap_read((map), (addr), &(val)); \
     181                if (__timeout_us && ktime_compare(ktime_get(), timeout) > 0) { \
     182                        pollret = regmap_field_read((field), &(val)); \
    137183                        break; \
    138184                } \
    139                 if (sleep_us) \
    140                         usleep_range((sleep_us >> 2) + 1, sleep_us); \
     185                if (__sleep_us) \
     186                        usleep_range((__sleep_us >> 2) + 1, __sleep_us); \
    141187        } \
    142188        pollret ?: ((cond) ? 0 : -ETIMEDOUT); \
    143189})
    144190
     191#define CONFIG_REGMAP
    145192#ifdef CONFIG_REGMAP
    146193
     
    224271 *                check is performed on such table (a register is precious if
    225272 *                it belongs to one of the ranges specified by precious_table).
     273 * @readable_noinc_reg: Optional callback returning true if the register
     274 *                      supports multiple read operations without incrementing
     275 *                      the register number. If this field is NULL but
     276 *                      rd_noinc_table (see below) is not, the check is
     277 *                      performed on such table (a register is no increment
     278 *                      readable if it belongs to one of the ranges specified
     279 *                      by rd_noinc_table).
     280 * @disable_locking: This regmap is either protected by external means or
     281 *                   is guaranteed not be be accessed from multiple threads.
     282 *                   Don't use any locking mechanisms.
    226283 * @lock:         Optional lock callback (overrides regmap's default lock
    227284 *                function, based on spinlock or mutex).
     
    248305 * @volatile_table: As above, for volatile registers.
    249306 * @precious_table: As above, for precious registers.
     307 * @rd_noinc_table: As above, for no increment readable registers.
    250308 * @reg_defaults: Power on reset values for registers (for use with
    251309 *                register cache support).
     
    256314 * @write_flag_mask: Mask to be set in the top bytes of the register when doing
    257315 *                   a write. If both read_flag_mask and write_flag_mask are
    258  *                   empty the regmap_bus default masks are used.
     316 *                   empty and zero_flag_mask is not set the regmap_bus default
     317 *                   masks are used.
     318 * @zero_flag_mask: If set, read_flag_mask and write_flag_mask are used even
     319 *                   if they are both empty.
    259320 * @use_single_rw: If set, converts the bulk read and write operations into
    260321 *                  a series of single read and write operations. This is useful
     
    277338 * @ranges: Array of configuration entries for virtual address ranges.
    278339 * @num_ranges: Number of range configuration entries.
     340 * @use_hwlock: Indicate if a hardware spinlock should be used.
     341 * @hwlock_id: Specify the hardware spinlock id.
     342 * @hwlock_mode: The hardware spinlock mode, should be HWLOCK_IRQSTATE,
     343 *               HWLOCK_IRQ or 0.
    279344 */
    280345struct regmap_config {
     
    290355        bool (*volatile_reg)(struct device *dev, unsigned int reg);
    291356        bool (*precious_reg)(struct device *dev, unsigned int reg);
     357        bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
     358
     359        bool disable_locking;
    292360        regmap_lock lock;
    293361        regmap_unlock unlock;
     
    304372        const struct regmap_access_table *volatile_table;
    305373        const struct regmap_access_table *precious_table;
     374        const struct regmap_access_table *rd_noinc_table;
    306375        const struct reg_default *reg_defaults;
    307376        unsigned int num_reg_defaults;
     
    312381        unsigned long read_flag_mask;
    313382        unsigned long write_flag_mask;
     383        bool zero_flag_mask;
    314384
    315385        bool use_single_read;
     
    322392        const struct regmap_range_cfg *ranges;
    323393        unsigned int num_ranges;
     394
     395        bool use_hwlock;
     396        unsigned int hwlock_id;
     397        unsigned int hwlock_mode;
    324398};
    325399
     
    454528                                 struct lock_class_key *lock_key,
    455529                                 const char *lock_name);
     530struct regmap *__regmap_init_sccb(struct i2c_client *i2c,
     531                                  const struct regmap_config *config,
     532                                  struct lock_class_key *lock_key,
     533                                  const char *lock_name);
     534struct regmap *__regmap_init_slimbus(struct slim_device *slimbus,
     535                                 const struct regmap_config *config,
     536                                 struct lock_class_key *lock_key,
     537                                 const char *lock_name);
    456538struct regmap *__regmap_init_spi(struct spi_device *dev,
    457539                                 const struct regmap_config *config,
     
    479561                                  struct lock_class_key *lock_key,
    480562                                  const char *lock_name);
     563struct regmap *__regmap_init_sdw(struct sdw_slave *sdw,
     564                                 const struct regmap_config *config,
     565                                 struct lock_class_key *lock_key,
     566                                 const char *lock_name);
    481567
    482568struct regmap *__devm_regmap_init(struct device *dev,
     
    490576                                      struct lock_class_key *lock_key,
    491577                                      const char *lock_name);
     578struct regmap *__devm_regmap_init_sccb(struct i2c_client *i2c,
     579                                       const struct regmap_config *config,
     580                                       struct lock_class_key *lock_key,
     581                                       const char *lock_name);
    492582struct regmap *__devm_regmap_init_spi(struct spi_device *dev,
    493583                                      const struct regmap_config *config,
     
    516606                                       struct lock_class_key *lock_key,
    517607                                       const char *lock_name);
    518 
     608struct regmap *__devm_regmap_init_sdw(struct sdw_slave *sdw,
     609                                 const struct regmap_config *config,
     610                                 struct lock_class_key *lock_key,
     611                                 const char *lock_name);
     612struct regmap *__devm_regmap_init_slimbus(struct slim_device *slimbus,
     613                                 const struct regmap_config *config,
     614                                 struct lock_class_key *lock_key,
     615                                 const char *lock_name);
    519616/*
    520617 * Wrapper for regmap_init macros to include a unique lockdep key and name
     
    571668
    572669/**
     670 * regmap_init_sccb() - Initialise register map
     671 *
     672 * @i2c: Device that will be interacted with
     673 * @config: Configuration for register map
     674 *
     675 * The return value will be an ERR_PTR() on error or a valid pointer to
     676 * a struct regmap.
     677 */
     678#define regmap_init_sccb(i2c, config)                                   \
     679        __regmap_lockdep_wrapper(__regmap_init_sccb, #config,           \
     680                                i2c, config)
     681
     682/**
     683 * regmap_init_slimbus() - Initialise register map
     684 *
     685 * @slimbus: Device that will be interacted with
     686 * @config: Configuration for register map
     687 *
     688 * The return value will be an ERR_PTR() on error or a valid pointer to
     689 * a struct regmap.
     690 */
     691#define regmap_init_slimbus(slimbus, config)                            \
     692        __regmap_lockdep_wrapper(__regmap_init_slimbus, #config,        \
     693                                slimbus, config)
     694
     695/**
    573696 * regmap_init_spi() - Initialise register map
    574697 *
     
    665788
    666789/**
     790 * regmap_init_sdw() - Initialise register map
     791 *
     792 * @sdw: Device that will be interacted with
     793 * @config: Configuration for register map
     794 *
     795 * The return value will be an ERR_PTR() on error or a valid pointer to
     796 * a struct regmap.
     797 */
     798#define regmap_init_sdw(sdw, config)                                    \
     799        __regmap_lockdep_wrapper(__regmap_init_sdw, #config,            \
     800                                sdw, config)
     801
     802
     803/**
    667804 * devm_regmap_init() - Initialise managed register map
    668805 *
     
    696833
    697834/**
     835 * devm_regmap_init_sccb() - Initialise managed register map
     836 *
     837 * @i2c: Device that will be interacted with
     838 * @config: Configuration for register map
     839 *
     840 * The return value will be an ERR_PTR() on error or a valid pointer
     841 * to a struct regmap.  The regmap will be automatically freed by the
     842 * device management code.
     843 */
     844#define devm_regmap_init_sccb(i2c, config)                              \
     845        __regmap_lockdep_wrapper(__devm_regmap_init_sccb, #config,      \
     846                                i2c, config)
     847
     848/**
    698849 * devm_regmap_init_spi() - Initialise register map
    699850 *
     
    794945                                ac97, config)
    795946
     947/**
     948 * devm_regmap_init_sdw() - Initialise managed register map
     949 *
     950 * @sdw: Device that will be interacted with
     951 * @config: Configuration for register map
     952 *
     953 * The return value will be an ERR_PTR() on error or a valid pointer
     954 * to a struct regmap. The regmap will be automatically freed by the
     955 * device management code.
     956 */
     957#define devm_regmap_init_sdw(sdw, config)                               \
     958        __regmap_lockdep_wrapper(__devm_regmap_init_sdw, #config,       \
     959                                sdw, config)
     960
     961/**
     962 * devm_regmap_init_slimbus() - Initialise managed register map
     963 *
     964 * @slimbus: Device that will be interacted with
     965 * @config: Configuration for register map
     966 *
     967 * The return value will be an ERR_PTR() on error or a valid pointer
     968 * to a struct regmap. The regmap will be automatically freed by the
     969 * device management code.
     970 */
     971#define devm_regmap_init_slimbus(slimbus, config)                       \
     972        __regmap_lockdep_wrapper(__devm_regmap_init_slimbus, #config,   \
     973                                slimbus, config)
     974int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk);
     975void regmap_mmio_detach_clk(struct regmap *map);
    796976void regmap_exit(struct regmap *map);
    797977int regmap_reinit_cache(struct regmap *map,
     
    815995int regmap_raw_read(struct regmap *map, unsigned int reg,
    816996                    void *val, size_t val_len);
     997int regmap_noinc_read(struct regmap *map, unsigned int reg,
     998                      void *val, size_t val_len);
    817999int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
    8181000                     size_t val_count);
     
    10191201                               unsigned int val)
    10201202{
    1021         WARN_ONCE(1, "regmap API is disabled");
     1203//      WARN_ONCE(1, "regmap API is disabled");
    10221204        return -EINVAL;
    10231205}
     
    10601242static inline int regmap_raw_read(struct regmap *map, unsigned int reg,
    10611243                                  void *val, size_t val_len)
     1244{
     1245        WARN_ONCE(1, "regmap API is disabled");
     1246        return -EINVAL;
     1247}
     1248
     1249static inline int regmap_noinc_read(struct regmap *map, unsigned int reg,
     1250                                    void *val, size_t val_len)
    10621251{
    10631252        WARN_ONCE(1, "regmap API is disabled");
  • GPL/branches/uniaud32-next/include/linux/slab.h

    r623 r625  
    77#include <linux/types.h>
    88#include <linux/list.h>
     9#include <linux/overflow.h>
    910
    1011#if     !defined(_LINUX_SLAB_H)
  • GPL/branches/uniaud32-next/include/linux/time.h

    r615 r625  
    66#include <linux/ktime.h>
    77#include <linux/time64.h>
     8#include <linux/math64.h>
    89
    910#define NSEC_PER_SEC    1000000000L
  • GPL/branches/uniaud32-next/include/linux/time64.h

    r615 r625  
    11#ifndef _LINUX_TIME64_H
    22#define _LINUX_TIME64_H
     3
     4#include <linux/math64.h>
    35
    46typedef __s64 time64_t;
  • GPL/branches/uniaud32-next/include/linux/timecounter.h

    r615 r625  
    11#ifndef _LINUX_TIMECOUNTER_H
    22#define _LINUX_TIMECOUNTER_H
    3 
     3#include <linux/clocksource.h>
    44#endif /* _LINUX_TIMECOUNTER_H */
  • GPL/branches/uniaud32-next/include/linux/vga_switcheroo.h

    r615 r625  
    1 #ifndef _LINUX_EXPORT_H
    2 #define _LINUX_EXPORT_H
     1#ifndef _LINUX_VGA_SWITCHEROO_H
     2#define _LINUX_VGA_SWITCHEROO_H
    33
    4 #endif /* _LINUX_EXPORT_H */
     4#endif /* _LINUX_VGA_SWITCHEROO_H */
  • GPL/branches/uniaud32-next/include/linux/vgaarb.h

    r615 r625  
    1 #ifndef _LINUX_EXPORT_H
    2 #define _LINUX_EXPORT_H
     1#ifndef _LINUX_VGAARB_H
     2#define _LINUX_VGAARB_H
    33
    4 #endif /* _LINUX_EXPORT_H */
     4#endif /* _LINUX_VGAARB_H */
  • GPL/branches/uniaud32-next/include/linux/vmalloc.h

    r615 r625  
    44//#include <linux/sched.h>
    55//#include <linux/mm.h>
     6#include <linux/overflow.h>
    67
    78#include <asm/page.h>
  • GPL/branches/uniaud32-next/include/linux/wait.h

    r615 r625  
    130130void __wake_up_locked(wait_queue_head_t *q, unsigned int mode, int nr);
    131131#endif /* __KERNEL__ */
    132 
     132#define wait_event_lock_irq(wq_head, condition, lock)
     133#define wake_up_all(x)                 
    133134#endif
  • GPL/branches/uniaud32-next/lib32/drivers_base.c

    r615 r625  
    1313#include <linux/device.h>
    1414#include <linux/err.h>
     15#include <linux/pci.h>
    1516#include <linux/init.h>
    1617#include <linux/module.h>
     
    154155EXPORT_SYMBOL_GPL(put_device);
    155156
     157/**
     158 * dev_driver_string - Return a device's driver name, if at all possible
     159 * @dev: struct device to get the name of
     160 *
     161 * Will return the device's driver's name if it is bound to a device.  If
     162 * the device is not bound to a driver, it will return the name of the bus
     163 * it is attached to.  If it is not attached to a bus either, an empty
     164 * string will be returned.
     165 */
     166const char *dev_driver_string(const struct device *dev)
     167{
     168        struct device_driver *drv;
     169
     170        /* dev->driver can change to NULL underneath us because of unbinding,
     171         * so be careful about accessing it.  dev->bus and dev->class should
     172         * never change once they are set, so they don't need special care.
     173         */
     174        drv = dev->driver;
     175        return drv ? drv->name :
     176                        (dev->bus ? dev->bus->name :
     177                        (dev->class ? dev->class->name : ""));
     178}
  • GPL/branches/uniaud32-next/lib32/internal.h

    r615 r625  
    1010 * published by the Free Software Foundation.
    1111 */
    12 /* from 4.14.202 */
     12/* from 4.19.163 */
    1313
    1414#ifndef _REGMAP_INTERNAL_H
     
    8282
    8383#ifdef CONFIG_DEBUG_FS
     84        bool debugfs_disable;
    8485        struct dentry *debugfs;
    8586        const char *debugfs_name;
     
    9899        bool (*volatile_reg)(struct device *dev, unsigned int reg);
    99100        bool (*precious_reg)(struct device *dev, unsigned int reg);
     101        bool (*readable_noinc_reg)(struct device *dev, unsigned int reg);
    100102        const struct regmap_access_table *wr_table;
    101103        const struct regmap_access_table *rd_table;
    102104        const struct regmap_access_table *volatile_table;
    103105        const struct regmap_access_table *precious_table;
     106        const struct regmap_access_table *rd_noinc_table;
    104107
    105108        int (*reg_read)(void *context, unsigned int reg, unsigned int *val);
     
    162165        struct rb_root range_tree;
    163166        void *selector_work_buf;        /* Scratch buffer used for selector */
     167
     168        struct hwspinlock *hwlock;
    164169};
    165170
     
    183188bool regmap_volatile(struct regmap *map, unsigned int reg);
    184189bool regmap_precious(struct regmap *map, unsigned int reg);
     190bool regmap_readable_noinc(struct regmap *map, unsigned int reg);
    185191
    186192int _regmap_write(struct regmap *map, unsigned int reg,
     
    218224extern void regmap_debugfs_init(struct regmap *map, const char *name);
    219225extern void regmap_debugfs_exit(struct regmap *map);
     226
     227static inline void regmap_debugfs_disable(struct regmap *map)
     228{
     229        map->debugfs_disable = true;
     230}
     231
    220232#else
    221233static inline void regmap_debugfs_initcall(void) { }
    222234static inline void regmap_debugfs_init(struct regmap *map, const char *name) { }
    223235static inline void regmap_debugfs_exit(struct regmap *map) { }
     236static inline void regmap_debugfs_disable(struct regmap *map) { }
    224237#endif
    225238
  • GPL/branches/uniaud32-next/lib32/ioctl.c

    r621 r625  
    276276
    277277        pcms = pcm_instances(deviceid);
    278 dprintf(("PSDebug: pcms= %d",pcms));
     278
    279279        if (!pcaps || !pcms) return -1;
    280280
  • GPL/branches/uniaud32-next/lib32/misc.c

    r615 r625  
    246246{
    247247    return 0;
     248}
     249//******************************************************************************
     250//******************************************************************************
     251struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode,
     252        struct proc_dir_entry *parent){
     253    struct proc_dir_entry *proc;
     254    proc = (struct proc_dir_entry *)kmalloc(sizeof(struct proc_dir_entry), 0);
     255    memset(proc, 0, sizeof(struct proc_dir_entry));
     256
     257    proc->name   = name;
     258    proc->parent = parent;
     259
     260    return proc;
     261}
     262//******************************************************************************
     263//******************************************************************************
     264struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent)
     265{
     266    return proc_mkdir_mode(name, S_IRUGO | S_IXUGO, parent);
     267}
     268//******************************************************************************
     269//******************************************************************************
     270struct proc_dir_entry *proc_symlink(const char *name, struct proc_dir_entry *parent, const char *dest)
     271{
     272    struct proc_dir_entry *proc;
     273    proc = (struct proc_dir_entry *)kmalloc(sizeof(struct proc_dir_entry), 0);
     274    memset(proc, 0, sizeof(struct proc_dir_entry));
     275
     276    proc->name   = name;
     277    proc->parent = parent;
     278    proc->data = dest;
     279
     280    return proc;
    248281}
    249282//******************************************************************************
  • GPL/branches/uniaud32-next/lib32/rbtree.c

    r615 r625  
    2121  linux/lib/rbtree.c
    2222*/
    23 /* from 4.14.202 */
     23/* from 4.19.163 */
    2424
    2525#include <linux/rbtree_augmented.h>
     
    9797}
    9898
    99 /*static*/ inline void
     99/*static inline*/ void
    100100__rb_insert(struct rb_node *node, struct rb_root *root,
    101101            bool newleft, struct rb_node **leftmost,
     
    243243 * and eliminate the dummy_rotate callback there
    244244 */
    245 /*static*/ inline void
     245/*static inline*/ void
    246246____rb_erase_color(struct rb_node *parent, struct rb_root *root,
    247247        void (*augment_rotate)(struct rb_node *old, struct rb_node *new))
     
    445445/*static inline*/ void dummy_rotate(struct rb_node *old, struct rb_node *new) {}
    446446
    447 /*static*/ const struct rb_augment_callbacks dummy_callbacks = {
     447static const struct rb_augment_callbacks dummy_callbacks = {
    448448        .propagate = dummy_propagate,
    449449        .copy = dummy_copy,
     
    607607EXPORT_SYMBOL(rb_replace_node);
    608608
     609void rb_replace_node_cached(struct rb_node *victim, struct rb_node *new,
     610                            struct rb_root_cached *root)
     611{
     612        rb_replace_node(victim, new, &root->rb_root);
     613
     614        if (root->rb_leftmost == victim)
     615                root->rb_leftmost = new;
     616}
     617EXPORT_SYMBOL(rb_replace_node_cached);
     618
    609619#ifndef TARGET_OS2
    610620void rb_replace_node_rcu(struct rb_node *victim, struct rb_node *new,
     
    631641#endif
    632642
    633 /*static*/ struct rb_node *rb_left_deepest_node(const struct rb_node *node)
     643static struct rb_node *rb_left_deepest_node(const struct rb_node *node)
    634644{
    635645        for (;;) {
  • GPL/branches/uniaud32-next/lib32/regcache-flat.c

    r615 r625  
    1010 * published by the Free Software Foundation.
    1111 */
    12 /* from 4.14.202 */
     12/* from 4.19.163 */
    1313
    1414#include <linux/device.h>
    1515#include <linux/seq_file.h>
    1616#include <linux/slab.h>
    17 #include <linux/module.h>
    18 #include <linux/workqueue.h>
    19 #include <linux/byteorder/little_endian.h>
    20 #include <linux/printk.h>
    2117
    2218#include "internal.h"
     
    4339        cache = map->cache;
    4440
    45         for (i = 0; i < map->num_reg_defaults; i++)
    46                 cache[regcache_flat_get_index(map, map->reg_defaults[i].reg)] =
    47                                 map->reg_defaults[i].def;
     41        for (i = 0; i < map->num_reg_defaults; i++) {
     42                unsigned int reg = map->reg_defaults[i].reg;
     43                unsigned int index = regcache_flat_get_index(map, reg);
     44
     45                cache[index] = map->reg_defaults[i].def;
     46        }
    4847
    4948        return 0;
     
    6261{
    6362        unsigned int *cache = map->cache;
     63        unsigned int index = regcache_flat_get_index(map, reg);
    6464
    65         *value = cache[regcache_flat_get_index(map, reg)];
     65        *value = cache[index];
    6666
    6767        return 0;
     
    7272{
    7373        unsigned int *cache = map->cache;
     74        unsigned int index = regcache_flat_get_index(map, reg);
    7475
    75         cache[regcache_flat_get_index(map, reg)] = value;
     76        cache[index] = value;
    7677
    7778        return 0;
  • GPL/branches/uniaud32-next/lib32/regcache-rbtree.c

    r621 r625  
    1010 * published by the Free Software Foundation.
    1111 */
    12 /* from 4.14.202 */
     12/* from 4.19.163 */
    1313
    1414//#include <linux/debugfs.h>
     
    2424#include "internal.h"
    2525
    26 /*static*/ int regcache_rbtree_write(struct regmap *map, unsigned int reg,
    27                                  unsigned int value);
    28 /*static*/ int regcache_rbtree_exit(struct regmap *map);
    29 
    3026#ifdef TARGET_OS2
    3127#define UINT_MAX        (~0U)
    32 #pragma pack(1)
    3328#endif
     29
     30/*static inline*/ int regcache_rbtree_write(struct regmap *map, unsigned int reg,
     31                                 unsigned int value);
     32/*static inline*/ int regcache_rbtree_exit(struct regmap *map);
     33
    3434struct regcache_rbtree_node {
    3535        /* block of adjacent registers */
    3636        void *block;
    3737        /* Which registers are present */
    38         unsigned long *cache_present;
     38        long *cache_present;
    3939        /* base register handled by this block */
    4040        unsigned int base_reg;
     
    4343        /* the actual rbtree node holding this block */
    4444        struct rb_node node;
    45 #ifndef TARGET_OS2
    46 } __attribute__ ((packed));
    47 #else
    48 };
    49 #pragma pack()
    50 #endif
     45} /*__attribute__ ((packed))*/;
    5146
    5247struct regcache_rbtree_ctx {
     
    5550};
    5651
    57 /*static inline*/ void regcache_rbtree_get_base_top_reg(
     52/*static inline*/ inline void regcache_rbtree_get_base_top_reg(
    5853        struct regmap *map,
    5954        struct regcache_rbtree_node *rbnode,
     
    6459}
    6560
    66 /*static*/ unsigned int regcache_rbtree_get_register(struct regmap *map,
     61/*static inline*/ unsigned int regcache_rbtree_get_register(struct regmap *map,
    6762        struct regcache_rbtree_node *rbnode, unsigned int idx)
    6863{
     
    7065}
    7166
    72 /*static*/ void regcache_rbtree_set_register(struct regmap *map,
     67/*static inline*/ void regcache_rbtree_set_register(struct regmap *map,
    7368                                         struct regcache_rbtree_node *rbnode,
    7469                                         unsigned int idx, unsigned int val)
     
    7873}
    7974
    80 /*static*/ struct regcache_rbtree_node *regcache_rbtree_lookup(struct regmap *map,
     75/*static inline*/ struct regcache_rbtree_node *regcache_rbtree_lookup(struct regmap *map,
    8176                                                           unsigned int reg)
    8277{
     
    108103                }
    109104        }
     105
    110106        return NULL;
    111107}
    112108
    113 /*static*/ int regcache_rbtree_insert(struct regmap *map, struct rb_root *root,
     109/*static inline*/ int regcache_rbtree_insert(struct regmap *map, struct rb_root *root,
    114110                                  struct regcache_rbtree_node *rbnode)
    115111{
     
    121117        parent = NULL;
    122118        new = &root->rb_node;
    123 
    124119        while (*new) {
    125120                rbnode_tmp = rb_entry(*new, struct regcache_rbtree_node, node);
     
    148143
    149144#ifdef CONFIG_DEBUG_FS
    150 /*static*/ int rbtree_show(struct seq_file *s, void *ignored)
     145/*static inline*/ int rbtree_show(struct seq_file *s, void *ignored)
    151146{
    152147        struct regmap *map = s->private;
     
    192187}
    193188
    194 /*static*/ int rbtree_open(struct inode *inode, struct file *file)
     189/*static inline*/ int rbtree_open(struct inode *inode, struct file *file)
    195190{
    196191        return single_open(file, rbtree_show, inode->i_private);
    197192}
    198193
    199 /*static*/ const struct file_operations rbtree_fops = {
     194/*static inline*/ const struct file_operations rbtree_fops = {
    200195        .open           = rbtree_open,
    201196        .read           = seq_read,
     
    204199};
    205200
    206 /*static*/ void rbtree_debugfs_init(struct regmap *map)
     201/*static inline*/ void rbtree_debugfs_init(struct regmap *map)
    207202{
    208203        debugfs_create_file("rbtree", 0400, map->debugfs, map, &rbtree_fops);
     
    210205#endif
    211206
    212 /*static*/ int regcache_rbtree_init(struct regmap *map)
     207/*static inline*/ int regcache_rbtree_init(struct regmap *map)
    213208{
    214209        struct regcache_rbtree_ctx *rbtree_ctx;
     
    233228#endif
    234229        rbtree_ctx->cached_rbnode = NULL;
     230
    235231        for (i = 0; i < map->num_reg_defaults; i++) {
    236232                ret = regcache_rbtree_write(map,
     
    248244}
    249245
    250 /*static*/ int regcache_rbtree_exit(struct regmap *map)
     246/*static inline*/ int regcache_rbtree_exit(struct regmap *map)
    251247{
    252248        struct rb_node *next;
     
    277273}
    278274
    279 /*static*/ int regcache_rbtree_read(struct regmap *map,
     275/*static inline*/ int regcache_rbtree_read(struct regmap *map,
    280276                                unsigned int reg, unsigned int *value)
    281277{
     
    292288                return -ENOENT;
    293289        }
    294         return 0;
    295 }
    296 
    297 
    298 /*static*/ int regcache_rbtree_insert_to_block(struct regmap *map,
     290
     291        return 0;
     292}
     293
     294
     295/*static inline*/ int regcache_rbtree_insert_to_block(struct regmap *map,
    299296                                           struct regcache_rbtree_node *rbnode,
    300297                                           unsigned int base_reg,
     
    351348}
    352349
    353 /*static*/ struct regcache_rbtree_node *
     350/*static inline*/ struct regcache_rbtree_node *
    354351regcache_rbtree_node_alloc(struct regmap *map, unsigned int reg)
    355352{
     
    369366                                break;
    370367                }
     368
    371369                if (i != map->rd_table->n_yes_ranges) {
    372370                        range = &map->rd_table->yes_ranges[i];
     
    376374                }
    377375        }
     376
    378377        if (!rbnode->blklen) {
    379378                rbnode->blklen = 1;
     
    401400}
    402401
    403 /*static*/ int regcache_rbtree_write(struct regmap *map, unsigned int reg,
     402/*static inline*/ int regcache_rbtree_write(struct regmap *map, unsigned int reg,
    404403                                 unsigned int value)
    405404{
     
    476475                                                              new_top_reg, reg,
    477476                                                              value);
    478                         if (ret){
    479                                 return ret;}
     477                        if (ret)
     478                                return ret;
    480479                        rbtree_ctx->cached_rbnode = rbnode;
    481480                        return 0;
     
    486485                 */
    487486                rbnode = regcache_rbtree_node_alloc(map, reg);
    488                 if (!rbnode){
    489                         return -ENOMEM;}
     487                if (!rbnode)
     488                        return -ENOMEM;
    490489                regcache_rbtree_set_register(map, rbnode,
    491490                                             reg - rbnode->base_reg, value);
     
    493492                rbtree_ctx->cached_rbnode = rbnode;
    494493        }
    495         return 0;
    496 }
    497 
    498 /*static*/ int regcache_rbtree_sync(struct regmap *map, unsigned int min,
     494
     495        return 0;
     496}
     497
     498/*static inline*/ int regcache_rbtree_sync(struct regmap *map, unsigned int min,
    499499                                unsigned int max)
    500500{
     
    537537}
    538538
    539 /*static*/ int regcache_rbtree_drop(struct regmap *map, unsigned int min,
     539/*static inline*/ int regcache_rbtree_drop(struct regmap *map, unsigned int min,
    540540                                unsigned int max)
    541541{
  • GPL/branches/uniaud32-next/lib32/regcache.c

    r621 r625  
    1010 * published by the Free Software Foundation.
    1111 */
    12 /* from 4.14.202 */
     12/* from 4.19.163 */
    1313
    1414//#include <linux/bsearch.h>
  • GPL/branches/uniaud32-next/lib32/regmap.c

    r621 r625  
    1010 * published by the Free Software Foundation.
    1111 */
    12 /* from 4.14.202 */
     12/* from 4.19.163 */
    1313
    1414#include <linux/device.h>
     
    2222#include <linux/delay.h>
    2323#include <linux/log2.h>
     24//#include <linux/hwspinlock.h>
     25#include <asm/unaligned.h>
    2426#include <linux/module.h>
    2527#include <linux/workqueue.h>
    2628#include <linux/byteorder/little_endian.h>
    2729#include <linux/printk.h>
     30
     31/* hwspinlock mode argument */
     32#define HWLOCK_IRQSTATE 0x01    /* Disable interrupts, save state */
     33#define HWLOCK_IRQ      0x02    /* Disable interrupts, don't save state */
     34#define HWLOCK_RAW      0x03
    2835
    2936#define CREATE_TRACE_POINTS
     
    4047#undef LOG_DEVICE
    4148
    42 static int _regmap_update_bits(struct regmap *map, unsigned int reg,
     49/*static inline*/ int _regmap_update_bits(struct regmap *map, unsigned int reg,
    4350                               unsigned int mask, unsigned int val,
    4451                               bool *change, bool force_write);
    4552
    46 static int _regmap_bus_reg_read(void *context, unsigned int reg,
     53/*static inline*/ int _regmap_bus_reg_read(void *context, unsigned int reg,
    4754                                unsigned int *val);
    48 static int _regmap_bus_read(void *context, unsigned int reg,
     55/*static inline*/ int _regmap_bus_read(void *context, unsigned int reg,
    4956                            unsigned int *val);
    50 static int _regmap_bus_formatted_write(void *context, unsigned int reg,
     57/*static inline*/ int _regmap_bus_formatted_write(void *context, unsigned int reg,
    5158                                       unsigned int val);
    52 static int _regmap_bus_reg_write(void *context, unsigned int reg,
     59/*static inline*/ int _regmap_bus_reg_write(void *context, unsigned int reg,
    5360                                 unsigned int val);
    54 static int _regmap_bus_raw_write(void *context, unsigned int reg,
     61/*static inline*/ int _regmap_bus_raw_write(void *context, unsigned int reg,
    5562                                 unsigned int val);
    5663
     
    173180}
    174181
    175 static bool regmap_volatile_range(struct regmap *map, unsigned int reg,
     182bool regmap_readable_noinc(struct regmap *map, unsigned int reg)
     183{
     184        if (map->readable_noinc_reg)
     185                return map->readable_noinc_reg(map->dev, reg);
     186
     187        if (map->rd_noinc_table)
     188                return regmap_check_range_table(map, reg, map->rd_noinc_table);
     189
     190        return true;
     191}
     192
     193/*static inline*/ bool regmap_volatile_range(struct regmap *map, unsigned int reg,
    176194        size_t num)
    177195{
     
    179197
    180198        for (i = 0; i < num; i++)
    181                 if (!regmap_volatile(map, reg + i))
     199                if (!regmap_volatile(map, reg + regmap_get_offset(map, i)))
    182200                        return false;
    183201
     
    185203}
    186204
    187 static void regmap_format_2_6_write(struct regmap *map,
     205/*static inline*/ void regmap_format_2_6_write(struct regmap *map,
    188206                                     unsigned int reg, unsigned int val)
    189207{
     
    193211}
    194212
    195 static void regmap_format_4_12_write(struct regmap *map,
     213/*static inline*/ void regmap_format_4_12_write(struct regmap *map,
    196214                                     unsigned int reg, unsigned int val)
    197215{
     
    200218}
    201219
    202 static void regmap_format_7_9_write(struct regmap *map,
     220/*static inline*/ void regmap_format_7_9_write(struct regmap *map,
    203221                                    unsigned int reg, unsigned int val)
    204222{
     
    207225}
    208226
    209 static void regmap_format_10_14_write(struct regmap *map,
     227/*static inline*/ void regmap_format_10_14_write(struct regmap *map,
    210228                                    unsigned int reg, unsigned int val)
    211229{
     
    217235}
    218236
    219 static void regmap_format_8(void *buf, unsigned int val, unsigned int shift)
     237/*static inline*/ void regmap_format_8(void *buf, unsigned int val, unsigned int shift)
    220238{
    221239        u8 *b = buf;
     
    224242}
    225243
    226 static void regmap_format_16_be(void *buf, unsigned int val, unsigned int shift)
    227 {
    228         __be16 *b = buf;
    229 
    230         b[0] = cpu_to_be16(val << shift);
    231 }
    232 
    233 static void regmap_format_16_le(void *buf, unsigned int val, unsigned int shift)
    234 {
    235         __le16 *b = buf;
    236 
    237         b[0] = cpu_to_le16(val << shift);
    238 }
    239 
    240 static void regmap_format_16_native(void *buf, unsigned int val,
     244/*static inline*/ void regmap_format_16_be(void *buf, unsigned int val, unsigned int shift)
     245{
     246        put_unaligned_be16(val << shift, buf);
     247}
     248
     249/*static inline*/ void regmap_format_16_le(void *buf, unsigned int val, unsigned int shift)
     250{
     251        put_unaligned_le16(val << shift, buf);
     252}
     253
     254/*static inline*/ void regmap_format_16_native(void *buf, unsigned int val,
    241255                                    unsigned int shift)
    242256{
    243         *(u16 *)buf = val << shift;
    244 }
    245 
    246 static void regmap_format_24(void *buf, unsigned int val, unsigned int shift)
     257        u16 v = val << shift;
     258
     259        memcpy(buf, &v, sizeof(v));
     260}
     261
     262/*static inline*/ void regmap_format_24(void *buf, unsigned int val, unsigned int shift)
    247263{
    248264        u8 *b = buf;
     
    255271}
    256272
    257 static void regmap_format_32_be(void *buf, unsigned int val, unsigned int shift)
    258 {
    259         __be32 *b = buf;
    260 
    261         b[0] = cpu_to_be32(val << shift);
    262 }
    263 
    264 static void regmap_format_32_le(void *buf, unsigned int val, unsigned int shift)
    265 {
    266         __le32 *b = buf;
    267 
    268         b[0] = cpu_to_le32(val << shift);
    269 }
    270 
    271 static void regmap_format_32_native(void *buf, unsigned int val,
     273/*static inline*/ void regmap_format_32_be(void *buf, unsigned int val, unsigned int shift)
     274{
     275        put_unaligned_be32(val << shift, buf);
     276}
     277
     278/*static inline*/ void regmap_format_32_le(void *buf, unsigned int val, unsigned int shift)
     279{
     280        put_unaligned_le32(val << shift, buf);
     281}
     282
     283/*static inline*/ void regmap_format_32_native(void *buf, unsigned int val,
    272284                                    unsigned int shift)
    273285{
    274         *(u32 *)buf = val << shift;
     286        u32 v = val << shift;
     287
     288        memcpy(buf, &v, sizeof(v));
    275289}
    276290
    277291#ifdef CONFIG_64BIT
    278 static void regmap_format_64_be(void *buf, unsigned int val, unsigned int shift)
    279 {
    280         __be64 *b = buf;
    281 
    282         b[0] = cpu_to_be64((u64)val << shift);
    283 }
    284 
    285 static void regmap_format_64_le(void *buf, unsigned int val, unsigned int shift)
    286 {
    287         __le64 *b = buf;
    288 
    289         b[0] = cpu_to_le64((u64)val << shift);
    290 }
    291 
    292 static void regmap_format_64_native(void *buf, unsigned int val,
     292/*static inline*/ void regmap_format_64_be(void *buf, unsigned int val, unsigned int shift)
     293{
     294        put_unaligned_be64((u64) val << shift, buf);
     295}
     296
     297/*static inline*/ void regmap_format_64_le(void *buf, unsigned int val, unsigned int shift)
     298{
     299        put_unaligned_le64((u64) val << shift, buf);
     300}
     301
     302/*static inline*/ void regmap_format_64_native(void *buf, unsigned int val,
    293303                                    unsigned int shift)
    294304{
    295         *(u64 *)buf = (u64)val << shift;
     305        u64 v = (u64) val << shift;
     306
     307        memcpy(buf, &v, sizeof(v));
    296308}
    297309#endif
    298310
    299 static void regmap_parse_inplace_noop(void *buf)
    300 {
    301 }
    302 
    303 static unsigned int regmap_parse_8(const void *buf)
     311/*static inline*/ void regmap_parse_inplace_noop(void *buf)
     312{
     313}
     314
     315/*static inline*/ unsigned int regmap_parse_8(const void *buf)
    304316{
    305317        const u8 *b = buf;
     
    308320}
    309321
    310 static unsigned int regmap_parse_16_be(const void *buf)
    311 {
    312         const __be16 *b = buf;
    313 
    314         return be16_to_cpu(b[0]);
    315 }
    316 
    317 static unsigned int regmap_parse_16_le(const void *buf)
    318 {
    319         const __le16 *b = buf;
    320 
    321         return le16_to_cpu(b[0]);
    322 }
    323 
    324 static void regmap_parse_16_be_inplace(void *buf)
    325 {
    326         __be16 *b = buf;
    327 
    328         b[0] = be16_to_cpu(b[0]);
    329 }
    330 
    331 static void regmap_parse_16_le_inplace(void *buf)
    332 {
    333         __le16 *b = buf;
    334 
    335         b[0] = le16_to_cpu(b[0]);
    336 }
    337 
    338 static unsigned int regmap_parse_16_native(const void *buf)
    339 {
    340         return *(u16 *)buf;
    341 }
    342 
    343 static unsigned int regmap_parse_24(const void *buf)
     322/*static inline*/ unsigned int regmap_parse_16_be(const void *buf)
     323{
     324        return get_unaligned_be16(buf);
     325}
     326
     327/*static inline*/ unsigned int regmap_parse_16_le(const void *buf)
     328{
     329        return get_unaligned_le16(buf);
     330}
     331
     332/*static inline*/ void regmap_parse_16_be_inplace(void *buf)
     333{
     334        u16 v = get_unaligned_be16(buf);
     335
     336        memcpy(buf, &v, sizeof(v));
     337}
     338
     339/*static inline*/ void regmap_parse_16_le_inplace(void *buf)
     340{
     341        u16 v = get_unaligned_le16(buf);
     342
     343        memcpy(buf, &v, sizeof(v));
     344}
     345
     346/*static inline*/ unsigned int regmap_parse_16_native(const void *buf)
     347{
     348        u16 v;
     349
     350        memcpy(&v, buf, sizeof(v));
     351        return v;
     352}
     353
     354/*static inline*/ unsigned int regmap_parse_24(const void *buf)
    344355{
    345356        const u8 *b = buf;
     
    351362}
    352363
    353 static unsigned int regmap_parse_32_be(const void *buf)
    354 {
    355         const __be32 *b = buf;
    356 
    357         return be32_to_cpu(b[0]);
    358 }
    359 
    360 static unsigned int regmap_parse_32_le(const void *buf)
    361 {
    362         const __le32 *b = buf;
    363 
    364         return le32_to_cpu(b[0]);
    365 }
    366 
    367 static void regmap_parse_32_be_inplace(void *buf)
    368 {
    369         __be32 *b = buf;
    370 
    371         b[0] = be32_to_cpu(b[0]);
    372 }
    373 
    374 static void regmap_parse_32_le_inplace(void *buf)
    375 {
    376         __le32 *b = buf;
    377 
    378         b[0] = le32_to_cpu(b[0]);
    379 }
    380 
    381 static unsigned int regmap_parse_32_native(const void *buf)
    382 {
    383         return *(u32 *)buf;
     364/*static inline*/ unsigned int regmap_parse_32_be(const void *buf)
     365{
     366        return get_unaligned_be32(buf);
     367}
     368
     369/*static inline*/ unsigned int regmap_parse_32_le(const void *buf)
     370{
     371        return get_unaligned_le32(buf);
     372}
     373
     374/*static inline*/ void regmap_parse_32_be_inplace(void *buf)
     375{
     376        u32 v = get_unaligned_be32(buf);
     377
     378        memcpy(buf, &v, sizeof(v));
     379}
     380
     381/*static inline*/ void regmap_parse_32_le_inplace(void *buf)
     382{
     383        u32 v = get_unaligned_le32(buf);
     384
     385        memcpy(buf, &v, sizeof(v));
     386}
     387
     388/*static inline*/ unsigned int regmap_parse_32_native(const void *buf)
     389{
     390        u32 v;
     391
     392        memcpy(&v, buf, sizeof(v));
     393        return v;
    384394}
    385395
    386396#ifdef CONFIG_64BIT
    387 static unsigned int regmap_parse_64_be(const void *buf)
    388 {
    389         const __be64 *b = buf;
    390 
    391         return be64_to_cpu(b[0]);
    392 }
    393 
    394 static unsigned int regmap_parse_64_le(const void *buf)
    395 {
    396         const __le64 *b = buf;
    397 
    398         return le64_to_cpu(b[0]);
    399 }
    400 
    401 static void regmap_parse_64_be_inplace(void *buf)
    402 {
    403         __be64 *b = buf;
    404 
    405         b[0] = be64_to_cpu(b[0]);
    406 }
    407 
    408 static void regmap_parse_64_le_inplace(void *buf)
    409 {
    410         __le64 *b = buf;
    411 
    412         b[0] = le64_to_cpu(b[0]);
    413 }
    414 
    415 static unsigned int regmap_parse_64_native(const void *buf)
    416 {
    417         return *(u64 *)buf;
     397/*static inline*/ unsigned int regmap_parse_64_be(const void *buf)
     398{
     399        return get_unaligned_be64(buf);
     400}
     401
     402/*static inline*/ unsigned int regmap_parse_64_le(const void *buf)
     403{
     404        return get_unaligned_le64(buf);
     405}
     406
     407/*static inline*/ void regmap_parse_64_be_inplace(void *buf)
     408{
     409        u64 v =  get_unaligned_be64(buf);
     410
     411        memcpy(buf, &v, sizeof(v));
     412}
     413
     414/*static inline*/ void regmap_parse_64_le_inplace(void *buf)
     415{
     416        u64 v = get_unaligned_le64(buf);
     417
     418        memcpy(buf, &v, sizeof(v));
     419}
     420
     421/*static inline*/ unsigned int regmap_parse_64_native(const void *buf)
     422{
     423        u64 v;
     424
     425        memcpy(&v, buf, sizeof(v));
     426        return v;
    418427}
    419428#endif
    420429
    421 static void regmap_lock_mutex(void *__map)
     430/*static inline*/ void regmap_lock_hwlock(void *__map)
     431{
     432        struct regmap *map = __map;
     433
     434//      hwspin_lock_timeout(map->hwlock, UINT_MAX);
     435}
     436
     437/*static inline*/ void regmap_lock_hwlock_irq(void *__map)
     438{
     439        struct regmap *map = __map;
     440
     441//      hwspin_lock_timeout_irq(map->hwlock, UINT_MAX);
     442}
     443
     444/*static inline*/ void regmap_lock_hwlock_irqsave(void *__map)
     445{
     446        struct regmap *map = __map;
     447
     448//      hwspin_lock_timeout_irqsave(map->hwlock, UINT_MAX,
     449//                                  &map->spinlock_flags);
     450}
     451
     452/*static inline*/ void regmap_unlock_hwlock(void *__map)
     453{
     454        struct regmap *map = __map;
     455
     456//      hwspin_unlock(map->hwlock);
     457}
     458
     459/*static inline*/ void regmap_unlock_hwlock_irq(void *__map)
     460{
     461        struct regmap *map = __map;
     462
     463//      hwspin_unlock_irq(map->hwlock);
     464}
     465
     466/*static inline*/ void regmap_unlock_hwlock_irqrestore(void *__map)
     467{
     468        struct regmap *map = __map;
     469
     470//      hwspin_unlock_irqrestore(map->hwlock, &map->spinlock_flags);
     471}
     472
     473/*static inline*/ void regmap_lock_unlock_none(void *__map)
     474{
     475
     476}
     477
     478/*static inline*/ void regmap_lock_mutex(void *__map)
    422479{
    423480        struct regmap *map = __map;
     
    425482}
    426483
    427 static void regmap_unlock_mutex(void *__map)
     484/*static inline*/ void regmap_unlock_mutex(void *__map)
    428485{
    429486        struct regmap *map = __map;
     
    431488}
    432489
    433 static void regmap_lock_spinlock(void *__map)
     490/*static inline*/ void regmap_lock_spinlock(void *__map)
    434491__acquires(&map->spinlock)
    435492{
     
    441498}
    442499
    443 static void regmap_unlock_spinlock(void *__map)
     500/*static inline*/ void regmap_unlock_spinlock(void *__map)
    444501__releases(&map->spinlock)
    445502{
     
    448505}
    449506
    450 static void dev_get_regmap_release(struct device *dev, void *res)
     507/*static inline*/ void dev_get_regmap_release(struct device *dev, void *res)
    451508{
    452509        /*
     
    457514}
    458515
    459 static bool _regmap_range_add(struct regmap *map,
     516/*static inline*/ bool _regmap_range_add(struct regmap *map,
    460517                              struct regmap_range_node *data)
    461518{
     
    482539}
    483540
    484 static struct regmap_range_node *_regmap_range_lookup(struct regmap *map,
     541/*static inline*/ struct regmap_range_node *_regmap_range_lookup(struct regmap *map,
    485542                                                      unsigned int reg)
    486543{
     
    502559}
    503560
    504 static void regmap_range_exit(struct regmap *map)
     561/*static inline*/ void regmap_range_exit(struct regmap *map)
    505562{
    506563        struct rb_node *next;
     
    540597EXPORT_SYMBOL_GPL(regmap_attach_dev);
    541598
    542 static enum regmap_endian regmap_get_reg_endian(const struct regmap_bus *bus,
     599/*static inline*/ enum regmap_endian regmap_get_reg_endian(const struct regmap_bus *bus,
    543600                                        const struct regmap_config *config)
    544601{
     
    633690        }
    634691
    635         if (config->lock && config->unlock) {
     692        if (config->name) {
     693#ifndef TARGET_OS2
     694                map->name = kstrdup_const(config->name, GFP_KERNEL);
     695#else
     696                map->name = config->name;
     697#endif
     698                if (!map->name) {
     699                        ret = -ENOMEM;
     700                        goto err_map;
     701                }
     702        }
     703
     704        if (config->disable_locking) {
     705                map->lock = map->unlock = regmap_lock_unlock_none;
     706                regmap_debugfs_disable(map);
     707        } else if (config->lock && config->unlock) {
    636708                map->lock = config->lock;
    637709                map->unlock = config->unlock;
    638710                map->lock_arg = config->lock_arg;
     711        } else if (config->use_hwlock) {
     712//              map->hwlock = hwspin_lock_request_specific(config->hwlock_id);
     713//              if (!map->hwlock) {
     714//                      ret = -ENXIO;
     715//                      goto err_name;
     716//              }
     717
     718                switch (config->hwlock_mode) {
     719                case HWLOCK_IRQSTATE:
     720                        map->lock = regmap_lock_hwlock_irqsave;
     721                        map->unlock = regmap_unlock_hwlock_irqrestore;
     722                        break;
     723                case HWLOCK_IRQ:
     724                        map->lock = regmap_lock_hwlock_irq;
     725                        map->unlock = regmap_unlock_hwlock_irq;
     726                        break;
     727                default:
     728                        map->lock = regmap_lock_hwlock;
     729                        map->unlock = regmap_unlock_hwlock;
     730                        break;
     731                }
     732
     733                map->lock_arg = map;
    639734        } else {
    640735                if ((bus && bus->fast_io) ||
     
    693788        map->volatile_table = config->volatile_table;
    694789        map->precious_table = config->precious_table;
     790        map->rd_noinc_table = config->rd_noinc_table;
    695791        map->writeable_reg = config->writeable_reg;
    696792        map->readable_reg = config->readable_reg;
    697793        map->volatile_reg = config->volatile_reg;
    698794        map->precious_reg = config->precious_reg;
     795        map->readable_noinc_reg = config->readable_noinc_reg;
    699796        map->cache_type = config->cache_type;
    700         map->name = config->name;
    701797
    702798        spin_lock_init(&map->async_lock);
     
    705801        init_waitqueue_head(&map->async_waitq);
    706802
    707         if (config->read_flag_mask || config->write_flag_mask) {
     803        if (config->read_flag_mask ||
     804            config->write_flag_mask ||
     805            config->zero_flag_mask) {
    708806                map->read_flag_mask = config->read_flag_mask;
    709807                map->write_flag_mask = config->write_flag_mask;
     
    739837                        break;
    740838                default:
    741                         goto err_map;
     839                        goto err_hwlock;
    742840                }
    743841                break;
     
    749847                        break;
    750848                default:
    751                         goto err_map;
     849                        goto err_hwlock;
    752850                }
    753851                break;
     
    759857                        break;
    760858                default:
    761                         goto err_map;
     859                        goto err_hwlock;
    762860                }
    763861                break;
     
    769867                        break;
    770868                default:
    771                         goto err_map;
     869                        goto err_hwlock;
    772870                }
    773871                break;
     
    789887                        break;
    790888                default:
    791                         goto err_map;
     889                        goto err_hwlock;
    792890                }
    793891                break;
     
    795893        case 24:
    796894                if (reg_endian != REGMAP_ENDIAN_BIG)
    797                         goto err_map;
     895                        goto err_hwlock;
    798896                map->format.format_reg = regmap_format_24;
    799897                break;
     
    811909                        break;
    812910                default:
    813                         goto err_map;
     911                        goto err_hwlock;
    814912                }
    815913                break;
     
    828926                        break;
    829927                default:
    830                         goto err_map;
     928                        goto err_hwlock;
    831929                }
    832930                break;
     
    834932
    835933        default:
    836                 goto err_map;
     934                goto err_hwlock;
    837935        }
    838936
     
    863961                        break;
    864962                default:
    865                         goto err_map;
     963                        goto err_hwlock;
    866964                }
    867965                break;
    868966        case 24:
    869967                if (val_endian != REGMAP_ENDIAN_BIG)
    870                         goto err_map;
     968                        goto err_hwlock;
    871969                map->format.format_val = regmap_format_24;
    872970                map->format.parse_val = regmap_parse_24;
     
    889987                        break;
    890988                default:
    891                         goto err_map;
     989                        goto err_hwlock;
    892990                }
    893991                break;
     
    9101008                        break;
    9111009                default:
    912                         goto err_map;
     1010                        goto err_hwlock;
    9131011                }
    9141012                break;
     
    9191017                if ((reg_endian != REGMAP_ENDIAN_BIG) ||
    9201018                    (val_endian != REGMAP_ENDIAN_BIG))
    921                         goto err_map;
     1019                        goto err_hwlock;
    9221020                map->use_single_write = true;
    9231021        }
     
    9251023        if (!map->format.format_write &&
    9261024            !(map->format.format_reg && map->format.format_val))
    927                 goto err_map;
     1025                goto err_hwlock;
    9281026
    9291027        map->work_buf = kzalloc(map->format.buf_size, GFP_KERNEL);
    9301028        if (map->work_buf == NULL) {
    9311029                ret = -ENOMEM;
    932                 goto err_map;
     1030                goto err_hwlock;
    9331031        }
    9341032
     
    10471145        if (dev) {
    10481146                ret = regmap_attach_dev(dev, map, config);
    1049 
    10501147                if (ret != 0)
    10511148                        goto err_regcache;
     1149        } else {
     1150                regmap_debugfs_init(map, config->name);
    10521151        }
    10531152
     
    10591158        regmap_range_exit(map);
    10601159        kfree(map->work_buf);
     1160err_hwlock:
     1161//      if (map->hwlock)
     1162//              hwspin_lock_free(map->hwlock);
     1163err_name:
     1164//      kfree_const(map->name);
    10611165err_map:
    10621166        kfree(map);
     
    10671171
    10681172#ifndef TARGET_OS2
    1069 static void devm_regmap_release(struct device *dev, void *res)
     1173/*static inline*/ void devm_regmap_release(struct device *dev, void *res)
    10701174{
    10711175        regmap_exit(*(struct regmap **)res);
     
    10991203#endif
    11001204
    1101 static void regmap_field_init(struct regmap_field *rm_field,
     1205/*static inline*/ void regmap_field_init(struct regmap_field *rm_field,
    11021206        struct regmap *regmap, struct reg_field reg_field)
    11031207{
     
    12161320        map->volatile_reg = config->volatile_reg;
    12171321        map->precious_reg = config->precious_reg;
     1322        map->readable_noinc_reg = config->readable_noinc_reg;
    12181323        map->cache_type = config->cache_type;
    12191324
     
    12501355                kfree(async);
    12511356        }
     1357//      if (map->hwlock)
     1358//              hwspin_lock_free(map->hwlock);
     1359//      kfree_const(map->name);
     1360        kfree(map->patch);
    12521361        kfree(map);
    12531362}
    12541363EXPORT_SYMBOL_GPL(regmap_exit);
    12551364
    1256 static int dev_get_regmap_match(struct device *dev, void *res, void *data)
     1365/*static inline*/ int dev_get_regmap_match(struct device *dev, void *res, void *data)
    12571366{
    12581367        struct regmap **r = res;
     
    13051414EXPORT_SYMBOL_GPL(regmap_get_device);
    13061415
    1307 static int _regmap_select_page(struct regmap *map, unsigned int *reg,
     1416/*static inline*/ int _regmap_select_page(struct regmap *map, unsigned int *reg,
    13081417                               struct regmap_range_node *range,
    13091418                               unsigned int val_num)
     
    13531462}
    13541463
    1355 static void regmap_set_work_buf_flag_mask(struct regmap *map, int max_bytes,
     1464/*static inline*/ void regmap_set_work_buf_flag_mask(struct regmap *map, int max_bytes,
    13561465                                          unsigned long mask)
    13571466{
     
    13681477}
    13691478
    1370 int _regmap_raw_write(struct regmap *map, unsigned int reg,
    1371                       const void *val, size_t val_len)
     1479/*static inline*/ int _regmap_raw_write_impl(struct regmap *map, unsigned int reg,
     1480                                  const void *val, size_t val_len)
    13721481{
    13731482        struct regmap_range_node *range;
     
    14201529                        dev_dbg(map->dev, "Writing window %d/%zu\n",
    14211530                                win_residue, val_len / map->format.val_bytes);
    1422                         ret = _regmap_raw_write(map, reg, val, win_residue *
    1423                                                 map->format.val_bytes);
     1531                        ret = _regmap_raw_write_impl(map, reg, val,
     1532                                                     win_residue *
     1533                                                     map->format.val_bytes);
    14241534                        if (ret != 0)
    14251535                                return ret;
     
    15881698EXPORT_SYMBOL_GPL(regmap_get_raw_write_max);
    15891699
    1590 static int _regmap_bus_formatted_write(void *context, unsigned int reg,
     1700/*static inline*/ int _regmap_bus_formatted_write(void *context, unsigned int reg,
    15911701                                       unsigned int val)
    15921702{
     
    16121722}
    16131723
    1614 static int _regmap_bus_reg_write(void *context, unsigned int reg,
     1724/*static inline*/ int _regmap_bus_reg_write(void *context, unsigned int reg,
    16151725                                 unsigned int val)
    16161726{
     
    16201730}
    16211731
    1622 static int _regmap_bus_raw_write(void *context, unsigned int reg,
     1732/*static inline*/ int _regmap_bus_raw_write(void *context, unsigned int reg,
    16231733                                 unsigned int val)
    16241734{
     
    16291739        map->format.format_val(map->work_buf + map->format.reg_bytes
    16301740                               + map->format.pad_bytes, val, 0);
    1631         return _regmap_raw_write(map, reg,
    1632                                  map->work_buf +
    1633                                  map->format.reg_bytes +
    1634                                  map->format.pad_bytes,
    1635                                  map->format.val_bytes);
    1636 }
    1637 
    1638 static inline void *_regmap_map_get_context(struct regmap *map)
     1741        return _regmap_raw_write_impl(map, reg,
     1742                                      map->work_buf +
     1743                                      map->format.reg_bytes +
     1744                                      map->format.pad_bytes,
     1745                                      map->format.val_bytes);
     1746}
     1747
     1748/*static inline*/ inline void *_regmap_map_get_context(struct regmap *map)
    16391749{
    16401750        return (map->bus) ? map : map->bus_context;
     
    17281838EXPORT_SYMBOL_GPL(regmap_write_async);
    17291839
     1840int _regmap_raw_write(struct regmap *map, unsigned int reg,
     1841                      const void *val, size_t val_len)
     1842{
     1843        size_t val_bytes = map->format.val_bytes;
     1844        size_t val_count = val_len / val_bytes;
     1845        size_t chunk_count, chunk_bytes;
     1846        size_t chunk_regs = val_count;
     1847        int ret, i;
     1848
     1849        if (!val_count)
     1850                return -EINVAL;
     1851
     1852        if (map->use_single_write)
     1853                chunk_regs = 1;
     1854        else if (map->max_raw_write && val_len > map->max_raw_write)
     1855                chunk_regs = map->max_raw_write / val_bytes;
     1856
     1857        chunk_count = val_count / chunk_regs;
     1858        chunk_bytes = chunk_regs * val_bytes;
     1859
     1860        /* Write as many bytes as possible with chunk_size */
     1861        for (i = 0; i < chunk_count; i++) {
     1862                ret = _regmap_raw_write_impl(map, reg, val, chunk_bytes);
     1863                if (ret)
     1864                        return ret;
     1865
     1866                reg += regmap_get_offset(map, chunk_regs);
     1867                val += chunk_bytes;
     1868                val_len -= chunk_bytes;
     1869        }
     1870
     1871        /* Write remaining bytes */
     1872        if (val_len)
     1873                ret = _regmap_raw_write_impl(map, reg, val, val_len);
     1874
     1875        return ret;
     1876}
     1877
    17301878/**
    17311879 * regmap_raw_write() - Write raw values to one or more registers
     
    17531901        if (val_len % map->format.val_bytes)
    17541902                return -EINVAL;
    1755         if (map->max_raw_write && map->max_raw_write < val_len)
    1756                 return -E2BIG;
    17571903
    17581904        map->lock(map->lock_arg);
     
    18451991        int ret = 0, i;
    18461992        size_t val_bytes = map->format.val_bytes;
    1847         size_t total_size = val_bytes * val_count;
    18481993
    18491994        if (!IS_ALIGNED(reg, map->reg_stride))
     
    18511996
    18521997        /*
    1853          * Some devices don't support bulk write, for
    1854          * them we have a series of single write operations in the first two if
    1855          * blocks.
    1856          *
    1857          * The first if block is used for memory mapped io. It does not allow
    1858          * val_bytes of 3 for example.
    1859          * The second one is for busses that do not provide raw I/O.
    1860          * The third one is used for busses which do not have these limitations
    1861          * and can write arbitrary value lengths.
     1998         * Some devices don't support bulk write, for them we have a series of
     1999         * single write operations.
    18622000         */
    1863         if (!map->bus) {
     2001        if (!map->bus || !map->format.parse_inplace) {
    18642002                map->lock(map->lock_arg);
    18652003                for (i = 0; i < val_count; i++) {
     
    18942032out:
    18952033                map->unlock(map->lock_arg);
    1896         } else if (map->bus && !map->format.parse_inplace) {
    1897                 const u8 *u8 = val;
    1898                 const u16 *u16 = val;
    1899                 const u32 *u32 = val;
    1900                 unsigned int ival;
    1901 
    1902                 for (i = 0; i < val_count; i++) {
    1903                         switch (map->format.val_bytes) {
    1904                         case 4:
    1905                                 ival = u32[i];
    1906                                 break;
    1907                         case 2:
    1908                                 ival = u16[i];
    1909                                 break;
    1910                         case 1:
    1911                                 ival = u8[i];
    1912                                 break;
    1913                         default:
    1914                                 return -EINVAL;
    1915                         }
    1916 
    1917                         ret = regmap_write(map, reg + (i * map->reg_stride),
    1918                                            ival);
    1919                         if (ret)
    1920                                 return ret;
    1921                 }
    1922         } else if (map->use_single_write ||
    1923                    (map->max_raw_write && map->max_raw_write < total_size)) {
    1924                 int chunk_stride = map->reg_stride;
    1925                 size_t chunk_size = val_bytes;
    1926                 size_t chunk_count = val_count;
    1927 
    1928                 if (!map->use_single_write) {
    1929                         chunk_size = map->max_raw_write;
    1930                         if (chunk_size % val_bytes)
    1931                                 chunk_size -= chunk_size % val_bytes;
    1932                         chunk_count = total_size / chunk_size;
    1933                         chunk_stride *= chunk_size / val_bytes;
    1934                 }
    1935 
    1936                 map->lock(map->lock_arg);
    1937                 /* Write as many bytes as possible with chunk_size */
    1938                 for (i = 0; i < chunk_count; i++) {
    1939                         ret = _regmap_raw_write(map,
    1940                                                 reg + (i * chunk_stride),
    1941                                                 val + (i * chunk_size),
    1942                                                 chunk_size);
    1943                         if (ret)
    1944                                 break;
    1945                 }
    1946 
    1947                 /* Write remaining bytes */
    1948                 if (!ret && chunk_size * i < total_size) {
    1949                         ret = _regmap_raw_write(map, reg + (i * chunk_stride),
    1950                                                 val + (i * chunk_size),
    1951                                                 total_size - i * chunk_size);
    1952                 }
    1953                 map->unlock(map->lock_arg);
    19542034        } else {
    19552035                void *wval;
    19562036
    1957                 if (!val_count)
    1958                         return -EINVAL;
    1959 
    19602037                wval = kmemdup(val, val_count * val_bytes, map->alloc_flags);
    1961                 if (!wval) {
    1962                         dev_err(map->dev, "Error in memory allocation\n");
     2038                if (!wval)
    19632039                        return -ENOMEM;
    1964                 }
     2040
    19652041                for (i = 0; i < val_count * val_bytes; i += val_bytes)
    19662042                        map->format.parse_inplace(wval + i);
    19672043
    1968                 map->lock(map->lock_arg);
    1969                 ret = _regmap_raw_write(map, reg, wval, val_bytes * val_count);
    1970                 map->unlock(map->lock_arg);
     2044                ret = regmap_raw_write(map, reg, wval, val_bytes * val_count);
    19712045
    19722046                kfree(wval);
     
    19832057 * relative. The page register has been written if that was necessary.
    19842058 */
    1985 static int _regmap_raw_multi_reg_write(struct regmap *map,
     2059/*static inline*/ int _regmap_raw_multi_reg_write(struct regmap *map,
    19862060                                       const struct reg_sequence *regs,
    19872061                                       size_t num_regs)
     
    20292103}
    20302104
    2031 static unsigned int _regmap_register_page(struct regmap *map,
     2105/*static inline*/ unsigned int _regmap_register_page(struct regmap *map,
    20322106                                          unsigned int reg,
    20332107                                          struct regmap_range_node *range)
     
    20382112}
    20392113
    2040 static int _regmap_range_multi_paged_reg_write(struct regmap *map,
     2114/*static inline*/ int _regmap_range_multi_paged_reg_write(struct regmap *map,
    20412115                                               struct reg_sequence *regs,
    20422116                                               size_t num_regs)
     
    21152189}
    21162190
    2117 static int _regmap_multi_reg_write(struct regmap *map,
     2191/*static inline*/ int _regmap_multi_reg_write(struct regmap *map,
    21182192                                   const struct reg_sequence *regs,
    21192193                                   size_t num_regs)
     
    23102384EXPORT_SYMBOL_GPL(regmap_raw_write_async);
    23112385
    2312 static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
    2313                             unsigned int val_len)
     2386/*static inline*/ int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
     2387                            unsigned int val_len, bool noinc)
    23142388{
    23152389        struct regmap_range_node *range;
     
    23242398        if (range) {
    23252399                ret = _regmap_select_page(map, &reg, range,
    2326                                           val_len / map->format.val_bytes);
     2400                                          noinc ? 1 : val_len / map->format.val_bytes);
    23272401                if (ret != 0)
    23282402                        return ret;
     
    23402414}
    23412415
    2342 static int _regmap_bus_reg_read(void *context, unsigned int reg,
     2416/*static inline*/ int _regmap_bus_reg_read(void *context, unsigned int reg,
    23432417                                unsigned int *val)
    23442418{
     
    23482422}
    23492423
    2350 static int _regmap_bus_read(void *context, unsigned int reg,
     2424/*static inline*/ int _regmap_bus_read(void *context, unsigned int reg,
    23512425                            unsigned int *val)
    23522426{
    23532427        int ret;
    23542428        struct regmap *map = context;
     2429        void *work_val = map->work_buf + map->format.reg_bytes +
     2430                map->format.pad_bytes;
    23552431
    23562432        if (!map->format.parse_val)
    23572433                return -EINVAL;
    23582434
    2359         ret = _regmap_raw_read(map, reg, map->work_buf, map->format.val_bytes);
     2435        ret = _regmap_raw_read(map, reg, work_val, map->format.val_bytes, false);
    23602436        if (ret == 0)
    2361                 *val = map->format.parse_val(map->work_buf);
     2437                *val = map->format.parse_val(work_val);
    23622438
    23632439        return ret;
    23642440}
    23652441
    2366 static int _regmap_read(struct regmap *map, unsigned int reg,
     2442/*static inline*/ int _regmap_read(struct regmap *map, unsigned int reg,
    23672443                        unsigned int *val)
    23682444{
     
    24552531        if (regmap_volatile_range(map, reg, val_count) || map->cache_bypass ||
    24562532            map->cache_type == REGCACHE_NONE) {
     2533                size_t chunk_count, chunk_bytes;
     2534                size_t chunk_regs = val_count;
     2535
    24572536                if (!map->bus->read) {
    24582537                        ret = -ENOTSUPP;
    24592538                        goto out;
    24602539                }
    2461                 if (map->max_raw_read && map->max_raw_read < val_len) {
    2462                         ret = -E2BIG;
    2463                         goto out;
    2464                 }
    2465 
    2466                 /* Physical block read if there's no cache involved */
    2467                 ret = _regmap_raw_read(map, reg, val, val_len);
    2468 
     2540
     2541                if (map->use_single_read)
     2542                        chunk_regs = 1;
     2543                else if (map->max_raw_read && val_len > map->max_raw_read)
     2544                        chunk_regs = map->max_raw_read / val_bytes;
     2545
     2546                chunk_count = val_count / chunk_regs;
     2547                chunk_bytes = chunk_regs * val_bytes;
     2548
     2549                /* Read bytes that fit into whole chunks */
     2550                for (i = 0; i < chunk_count; i++) {
     2551                        ret = _regmap_raw_read(map, reg, val, chunk_bytes, false);
     2552                        if (ret != 0)
     2553                                goto out;
     2554
     2555                        reg += regmap_get_offset(map, chunk_regs);
     2556                        val += chunk_bytes;
     2557                        val_len -= chunk_bytes;
     2558                }
     2559
     2560                /* Read remaining bytes */
     2561                if (val_len) {
     2562                        ret = _regmap_raw_read(map, reg, val, val_len, false);
     2563                        if (ret != 0)
     2564                                goto out;
     2565                }
    24692566        } else {
    24702567                /* Otherwise go word by word for the cache; should be low
     
    24892586
    24902587/**
    2491  * regmap_field_read() - Read a value to a single register field
     2588 * regmap_noinc_read(): Read data from a register without incrementing the
     2589 *                      register number
     2590 *
     2591 * @map: Register map to read from
     2592 * @reg: Register to read from
     2593 * @val: Pointer to data buffer
     2594 * @val_len: Length of output buffer in bytes.
     2595 *
     2596 * The regmap API usually assumes that bulk bus read operations will read a
     2597 * range of registers. Some devices have certain registers for which a read
     2598 * operation read will read from an internal FIFO.
     2599 *
     2600 * The target register must be volatile but registers after it can be
     2601 * completely unrelated cacheable registers.
     2602 *
     2603 * This will attempt multiple reads as required to read val_len bytes.
     2604 *
     2605 * A value of zero will be returned on success, a negative errno will be
     2606 * returned in error cases.
     2607 */
     2608int regmap_noinc_read(struct regmap *map, unsigned int reg,
     2609                      void *val, size_t val_len)
     2610{
     2611        size_t read_len;
     2612        int ret;
     2613
     2614        if (!map->bus)
     2615                return -EINVAL;
     2616        if (!map->bus->read)
     2617                return -ENOTSUPP;
     2618        if (val_len % map->format.val_bytes)
     2619                return -EINVAL;
     2620        if (!IS_ALIGNED(reg, map->reg_stride))
     2621                return -EINVAL;
     2622        if (val_len == 0)
     2623                return -EINVAL;
     2624
     2625        map->lock(map->lock_arg);
     2626
     2627        if (!regmap_volatile(map, reg) || !regmap_readable_noinc(map, reg)) {
     2628                ret = -EINVAL;
     2629                goto out_unlock;
     2630        }
     2631
     2632        while (val_len) {
     2633                if (map->max_raw_read && map->max_raw_read < val_len)
     2634                        read_len = map->max_raw_read;
     2635                else
     2636                        read_len = val_len;
     2637                ret = _regmap_raw_read(map, reg, val, read_len, true);
     2638                if (ret)
     2639                        goto out_unlock;
     2640                val = ((u8 *)val) + read_len;
     2641                val_len -= read_len;
     2642        }
     2643
     2644out_unlock:
     2645        map->unlock(map->lock_arg);
     2646        return ret;
     2647}
     2648EXPORT_SYMBOL_GPL(regmap_noinc_read);
     2649
     2650/**
     2651 * regmap_field_read(): Read a value to a single register field
    24922652 *
    24932653 * @field: Register field to read from
     
    25662726        if (!IS_ALIGNED(reg, map->reg_stride))
    25672727                return -EINVAL;
     2728        if (val_count == 0)
     2729                return -EINVAL;
    25682730
    25692731        if (map->bus && map->format.parse_inplace && (vol || map->cache_type == REGCACHE_NONE)) {
    2570                 /*
    2571                  * Some devices does not support bulk read, for
    2572                  * them we have a series of single read operations.
    2573                  */
    2574                 size_t total_size = val_bytes * val_count;
    2575 
    2576                 if (!map->use_single_read &&
    2577                     (!map->max_raw_read || map->max_raw_read > total_size)) {
    2578                         ret = regmap_raw_read(map, reg, val,
    2579                                               val_bytes * val_count);
    2580                         if (ret != 0)
    2581                                 return ret;
    2582                 } else {
    2583                         /*
    2584                          * Some devices do not support bulk read or do not
    2585                          * support large bulk reads, for them we have a series
    2586                          * of read operations.
    2587                          */
    2588                         int chunk_stride = map->reg_stride;
    2589                         size_t chunk_size = val_bytes;
    2590                         size_t chunk_count = val_count;
    2591 
    2592                         if (!map->use_single_read) {
    2593                                 chunk_size = map->max_raw_read;
    2594                                 if (chunk_size % val_bytes)
    2595                                         chunk_size -= chunk_size % val_bytes;
    2596                                 chunk_count = total_size / chunk_size;
    2597                                 chunk_stride *= chunk_size / val_bytes;
    2598                         }
    2599 
    2600                         /* Read bytes that fit into a multiple of chunk_size */
    2601                         for (i = 0; i < chunk_count; i++) {
    2602                                 ret = regmap_raw_read(map,
    2603                                                       reg + (i * chunk_stride),
    2604                                                       val + (i * chunk_size),
    2605                                                       chunk_size);
    2606                                 if (ret != 0)
    2607                                         return ret;
    2608                         }
    2609 
    2610                         /* Read remaining bytes */
    2611                         if (chunk_size * i < total_size) {
    2612                                 ret = regmap_raw_read(map,
    2613                                                       reg + (i * chunk_stride),
    2614                                                       val + (i * chunk_size),
    2615                                                       total_size - i * chunk_size);
    2616                                 if (ret != 0)
    2617                                         return ret;
    2618                         }
    2619                 }
     2732                ret = regmap_raw_read(map, reg, val, val_bytes * val_count);
     2733                if (ret != 0)
     2734                        return ret;
    26202735
    26212736                for (i = 0; i < val_count * val_bytes; i += val_bytes)
    26222737                        map->format.parse_inplace(val + i);
    26232738        } else {
     2739#ifdef CONFIG_64BIT
     2740                u64 *u64 = val;
     2741#endif
     2742                u32 *u32 = val;
     2743                u16 *u16 = val;
     2744                u8 *u8 = val;
     2745
     2746                map->lock(map->lock_arg);
     2747
    26242748                for (i = 0; i < val_count; i++) {
    26252749                        unsigned int ival;
    2626                         ret = regmap_read(map, reg + regmap_get_offset(map, i),
    2627                                           &ival);
     2750
     2751                        ret = _regmap_read(map, reg + regmap_get_offset(map, i),
     2752                                           &ival);
    26282753                        if (ret != 0)
    2629                                 return ret;
    2630 
    2631                         if (map->format.format_val) {
    2632                                 map->format.format_val(val + (i * val_bytes), ival, 0);
    2633                         } else {
    2634                                 /* Devices providing read and write
    2635                                  * operations can use the bulk I/O
    2636                                  * functions if they define a val_bytes,
    2637                                  * we assume that the values are native
    2638                                  * endian.
    2639                                  */
     2754                                goto out;
     2755
     2756                        switch (map->format.val_bytes) {
    26402757#ifdef CONFIG_64BIT
    2641                                 u64 *u64 = val;
     2758                        case 8:
     2759                                u64[i] = ival;
     2760                                break;
    26422761#endif
    2643                                 u32 *u32 = val;
    2644                                 u16 *u16 = val;
    2645                                 u8 *u8 = val;
    2646 
    2647                                 switch (map->format.val_bytes) {
    2648 #ifdef CONFIG_64BIT
    2649                                 case 8:
    2650                                         u64[i] = ival;
    2651                                         break;
    2652 #endif
    2653                                 case 4:
    2654                                         u32[i] = ival;
    2655                                         break;
    2656                                 case 2:
    2657                                         u16[i] = ival;
    2658                                         break;
    2659                                 case 1:
    2660                                         u8[i] = ival;
    2661                                         break;
    2662                                 default:
    2663                                         return -EINVAL;
    2664                                 }
     2762                        case 4:
     2763                                u32[i] = ival;
     2764                                break;
     2765                        case 2:
     2766                                u16[i] = ival;
     2767                                break;
     2768                        case 1:
     2769                                u8[i] = ival;
     2770                                break;
     2771                        default:
     2772                                ret = -EINVAL;
     2773                                goto out;
    26652774                        }
    26662775                }
    2667         }
    2668 
    2669         return 0;
     2776
     2777out:
     2778                map->unlock(map->lock_arg);
     2779        }
     2780
     2781        return ret;
    26702782}
    26712783EXPORT_SYMBOL_GPL(regmap_bulk_read);
    26722784
    2673 static int _regmap_update_bits(struct regmap *map, unsigned int reg,
     2785/*static inline*/ int _regmap_update_bits(struct regmap *map, unsigned int reg,
    26742786                               unsigned int mask, unsigned int val,
    26752787                               bool *change, bool force_write)
     
    27642876EXPORT_SYMBOL_GPL(regmap_async_complete_cb);
    27652877
    2766 #ifndef TARGET_OS2
    2767 static int regmap_async_is_done(struct regmap *map)
     2878/*static inline*/ int regmap_async_is_done(struct regmap *map)
    27682879{
    27692880        unsigned long flags;
     
    27762887        return ret;
    27772888}
    2778 #endif
    27792889
    27802890/**
     
    27952905                return 0;
    27962906
    2797 //FIXME wait_event(map->async_waitq, regmap_async_is_done(map));
     2907//      wait_event(map->async_waitq, regmap_async_is_done(map));
    27982908
    27992909        spin_lock_irqsave(&map->async_lock, flags);
     
    28352945                return 0;
    28362946#endif
    2837 
    28382947        p = krealloc(map->patch,
    28392948                     sizeof(struct reg_sequence) * (map->patch_regs + num_regs),
     
    29243033EXPORT_SYMBOL_GPL(regmap_parse_val);
    29253034
    2926 static int __init regmap_initcall(void)
     3035/*static inline*/ int __init regmap_initcall(void)
    29273036{
    29283037        regmap_debugfs_initcall();
  • GPL/branches/uniaud32-next/lib32/waitqueue.c

    r615 r625  
    109109        spin_unlock_irqrestore(&x->wait.lock, flags);
    110110}
     111/**
     112 * complete_all: - signals all threads waiting on this completion
     113 * @x:  holds the state of this particular completion
     114 *
     115 * This will wake up all threads waiting on this particular completion event.
     116 *
     117 * If this function wakes up a task, it executes a full memory barrier before
     118 * accessing the task state.
     119 *
     120 * Since complete_all() sets the completion of @x permanently to done
     121 * to allow multiple waiters to finish, a call to reinit_completion()
     122 * must be used on @x if @x is to be used again. The code must make
     123 * sure that all waiters have woken and finished before reinitializing
     124 * @x. Also note that the function completion_done() can not be used
     125 * to know if there are still waiters after complete_all() has been called.
     126 */
     127void complete_all(struct completion *x)
     128{
     129        unsigned long flags;
     130
     131        spin_lock_irqsave(&x->wait.lock, flags);
     132        __wake_up_locked(&x->wait, TASK_NORMAL, 1);
     133        spin_unlock_irqrestore(&x->wait.lock, flags);
     134}
    111135//******************************************************************************
    112136//******************************************************************************
     
    115139    dprintf3(("WARNING: __wake_up_locked STUB"));
    116140}
     141//******************************************************************************
     142//******************************************************************************
     143/**
     144 * wait_for_completion: - waits for completion of a task
     145 * @x:  holds the state of this particular completion
     146 *
     147 * This waits to be signaled for completion of a specific task. It is NOT
     148 * interruptible and there is no timeout.
     149 *
     150 * See also similar routines (i.e. wait_for_completion_timeout()) with timeout
     151 * and interrupt capability. Also see complete().
     152 */
     153void wait_for_completion(struct completion *x)
     154{
     155    dprintf3(("WARNING: wait_for_completion STUB"));
     156}
     157
     158
     159/**
     160 * wait_for_completion_timeout: - waits for completion of a task (w/timeout)
     161 * @x:  holds the state of this particular completion
     162 * @timeout:  timeout value in jiffies
     163 *
     164 * This waits for either a completion of a specific task to be signaled or for a
     165 * specified timeout to expire. The timeout is in jiffies. It is not
     166 * interruptible.
     167 *
     168 * Return: 0 if timed out, and positive (at least 1, or number of jiffies left
     169 * till timeout) if completed.
     170 */
     171unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout)
     172{
     173    dprintf3(("WARNING: wait_for_completion_timeout STUB"));
     174    return 1;
     175}
Note: See TracChangeset for help on using the changeset viewer.