]> Git Repo - linux.git/commitdiff
Merge branch 'akpm' (Andrew's patch-bomb)
authorLinus Torvalds <[email protected]>
Thu, 5 Apr 2012 22:30:34 +0000 (15:30 -0700)
committerLinus Torvalds <[email protected]>
Thu, 5 Apr 2012 22:30:34 +0000 (15:30 -0700)
Merge batch of fixes from Andrew Morton:
 "The simple_open() cleanup was held back while I wanted for laggards to
  merge things.

  I still need to send a few checkpoint/restore patches.  I've been
  wobbly about merging them because I'm wobbly about the overall
  prospects for success of the project.  But after speaking with Pavel
  at the LSF conference, it sounds like they're further toward
  completion than I feared - apparently davem is at the "has stopped
  complaining" stage regarding the net changes.  So I need to go back
  and re-review those patchs and their (lengthy) discussion."

* emailed from Andrew Morton <[email protected]>: (16 patches)
  memcg swap: use mem_cgroup_uncharge_swap fix
  backlight: add driver for DA9052/53 PMIC v1
  C6X: use set_current_blocked() and block_sigmask()
  MAINTAINERS: add entry for sparse checker
  MAINTAINERS: fix REMOTEPROC F: typo
  alpha: use set_current_blocked() and block_sigmask()
  simple_open: automatically convert to simple_open()
  scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()
  libfs: add simple_open()
  hugetlbfs: remove unregister_filesystem() when initializing module
  drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback
  fs/xattr.c:setxattr(): improve handling of allocation failures
  fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed
  fs/xattr.c: suppress page allocation failure warnings from sys_listxattr()
  sysrq: use SEND_SIG_FORCED instead of force_sig()
  proc: fix mount -t proc -o AAA

1  2 
MAINTAINERS
drivers/dma/coh901318.c
drivers/rtc/rtc-88pm860x.c
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/tty/serial/pch_uart.c
fs/pstore/inode.c
include/linux/fs.h

diff --combined MAINTAINERS
index 962232d627812799b0d4c537c00e62f58bf47df4,0104116eab3a70bb5bc313a0f469b02285844df3..3e25ba82e0fa578ce0dfbbb6d6f8f63bb083b29c
@@@ -1251,6 -1251,7 +1251,6 @@@ ATHEROS ATH5K WIRELESS DRIVE
  M:    Jiri Slaby <[email protected]>
  M:    Nick Kossifidis <[email protected]>
  M:    "Luis R. Rodriguez" <[email protected]>
 -M:    Bob Copeland <[email protected]>
  L:    [email protected]
  L:    [email protected]
  W:    http://wireless.kernel.org/en/users/Drivers/ath5k
@@@ -1939,7 -1940,7 +1939,7 @@@ F:      drivers/connector
  
  CONTROL GROUPS (CGROUPS)
  M:    Tejun Heo <[email protected]>
 -M:    Li Zefan <liz[email protected].com>
 +M:    Li Zefan <lizefan@huawei.com>
  L:    [email protected]
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
@@@ -2224,16 -2225,13 +2224,16 @@@ W:   http://lanana.org/docs/device-list/i
  S:    Maintained
  
  DEVICE-MAPPER  (LVM)
 -P:    Alasdair Kergon
 +M:    Alasdair Kergon <[email protected]>
 +M:    [email protected]
  L:    [email protected]
  W:    http://sources.redhat.com/dm
  Q:    http://patchwork.kernel.org/project/dm-devel/list/
 +T:    quilt http://people.redhat.com/agk/patches/linux/editing/
  S:    Maintained
  F:    Documentation/device-mapper/
  F:    drivers/md/dm*
 +F:    drivers/md/persistent-data/
  F:    include/linux/device-mapper.h
  F:    include/linux/dm-*.h
  
  S:    Supported
  F:    arch/x86/platform/mrst/pmu.*
  
 -INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT
 +INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
 +M:    Stanislav Yakovlev <[email protected]>
  L:    [email protected]
 -S:    Orphan
 +S:    Maintained
  F:    Documentation/networking/README.ipw2100
 -F:    drivers/net/wireless/ipw2x00/ipw2100.*
 -
 -INTEL PRO/WIRELESS 2915ABG NETWORK CONNECTION SUPPORT
 -L:    [email protected]
 -S:    Orphan
  F:    Documentation/networking/README.ipw2200
 -F:    drivers/net/wireless/ipw2x00/ipw2200.*
 +F:    drivers/net/wireless/ipw2x00/
  
  INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT)
  M:    Joseph Cihula <[email protected]>
@@@ -5180,7 -5182,7 +5180,7 @@@ F:      kernel/delayacct.
  PERFORMANCE EVENTS SUBSYSTEM
  M:    Peter Zijlstra <[email protected]>
  M:    Paul Mackerras <[email protected]>
 -M:    Ingo Molnar <mingo@elte.hu>
 +M:    Ingo Molnar <mingo@redhat.com>
  M:    Arnaldo Carvalho de Melo <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
  S:    Supported
@@@ -5637,7 -5639,7 +5637,7 @@@ M:      Ohad Ben-Cohen <[email protected]
  S:    Maintained
  F:    drivers/remoteproc/
  F:    Documentation/remoteproc.txt
- F:    include/linux/remoteproc.txt
+ F:    include/linux/remoteproc.h
  
  RFKILL
  M:    Johannes Berg <[email protected]>
@@@ -5771,12 -5773,6 +5771,12 @@@ F:    drivers/media/common/saa7146
  F:    drivers/media/video/*7146*
  F:    include/media/*7146*
  
 +SAMSUNG LAPTOP DRIVER
 +M:    Corentin Chary <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/platform/x86/samsung-laptop.c
 +
  SAMSUNG AUDIO (ASoC) DRIVERS
  M:    Sangbeom Kim <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -5828,7 -5824,7 +5828,7 @@@ S:      Maintaine
  F:    drivers/watchdog/sc1200wdt.c
  
  SCHEDULER
 -M:    Ingo Molnar <mingo@elte.hu>
 +M:    Ingo Molnar <mingo@redhat.com>
  M:    Peter Zijlstra <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
  S:    Maintained
@@@ -6287,6 -6283,15 +6287,15 @@@ F:    drivers/tty/serial/sunsu.
  F:    drivers/tty/serial/sunzilog.c
  F:    drivers/tty/serial/sunzilog.h
  
+ SPARSE CHECKER
+ M:    "Christopher Li" <[email protected]>
+ L:    [email protected]
+ W:    https://sparse.wiki.kernel.org/
+ T:    git git://git.kernel.org/pub/scm/devel/sparse/sparse.git
+ T:    git git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git
+ S:    Maintained
+ F:    include/linux/compiler.h
  SPEAR PLATFORM SUPPORT
  M:    Viresh Kumar <[email protected]>
  L:    [email protected]
diff --combined drivers/dma/coh901318.c
index dc89455f5550c90ffec150d16f3d0e06e5614ee0,a63badcd2d6ec92ea330331b7869ee936d2fcdce..750925f9638bab656b39ccff65bed7dbdbee405c
@@@ -24,7 -24,6 +24,7 @@@
  #include <mach/coh901318.h>
  
  #include "coh901318_lli.h"
 +#include "dmaengine.h"
  
  #define COHC_2_DEV(cohc) (&cohc->chan.dev->device)
  
@@@ -60,6 -59,7 +60,6 @@@ struct coh901318_base 
  struct coh901318_chan {
        spinlock_t lock;
        int allocated;
 -      int completed;
        int id;
        int stopped;
  
@@@ -104,13 -104,6 +104,6 @@@ static void coh901318_list_print(struc
  static struct coh901318_base *debugfs_dma_base;
  static struct dentry *dma_dentry;
  
- static int coh901318_debugfs_open(struct inode *inode, struct file *file)
- {
-       file->private_data = inode->i_private;
-       return 0;
- }
  static int coh901318_debugfs_read(struct file *file, char __user *buf,
                                  size_t count, loff_t *f_pos)
  {
  
  static const struct file_operations coh901318_debugfs_status_operations = {
        .owner          = THIS_MODULE,
-       .open           = coh901318_debugfs_open,
+       .open           = simple_open,
        .read           = coh901318_debugfs_read,
        .llseek         = default_llseek,
  };
@@@ -318,6 -311,20 +311,6 @@@ static int coh901318_prep_linked_list(s
  
        return 0;
  }
 -static dma_cookie_t
 -coh901318_assign_cookie(struct coh901318_chan *cohc,
 -                      struct coh901318_desc *cohd)
 -{
 -      dma_cookie_t cookie = cohc->chan.cookie;
 -
 -      if (++cookie < 0)
 -              cookie = 1;
 -
 -      cohc->chan.cookie = cookie;
 -      cohd->desc.cookie = cookie;
 -
 -      return cookie;
 -}
  
  static struct coh901318_desc *
  coh901318_desc_get(struct coh901318_chan *cohc)
@@@ -691,7 -698,7 +684,7 @@@ static void dma_tasklet(unsigned long d
        callback_param = cohd_fin->desc.callback_param;
  
        /* sign this job as completed on the channel */
 -      cohc->completed = cohd_fin->desc.cookie;
 +      dma_cookie_complete(&cohd_fin->desc);
  
        /* release the lli allocation and remove the descriptor */
        coh901318_lli_free(&cohc->base->pool, &cohd_fin->lli);
@@@ -915,7 -922,7 +908,7 @@@ static int coh901318_alloc_chan_resourc
        coh901318_config(cohc, NULL);
  
        cohc->allocated = 1;
 -      cohc->completed = chan->cookie = 1;
 +      dma_cookie_init(chan);
  
        spin_unlock_irqrestore(&cohc->lock, flags);
  
@@@ -952,16 -959,16 +945,16 @@@ coh901318_tx_submit(struct dma_async_tx
                                                   desc);
        struct coh901318_chan *cohc = to_coh901318_chan(tx->chan);
        unsigned long flags;
 +      dma_cookie_t cookie;
  
        spin_lock_irqsave(&cohc->lock, flags);
 -
 -      tx->cookie = coh901318_assign_cookie(cohc, cohd);
 +      cookie = dma_cookie_assign(tx);
  
        coh901318_desc_queue(cohc, cohd);
  
        spin_unlock_irqrestore(&cohc->lock, flags);
  
 -      return tx->cookie;
 +      return cookie;
  }
  
  static struct dma_async_tx_descriptor *
@@@ -1021,7 -1028,7 +1014,7 @@@ coh901318_prep_memcpy(struct dma_chan *
  static struct dma_async_tx_descriptor *
  coh901318_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
                        unsigned int sg_len, enum dma_transfer_direction direction,
 -                      unsigned long flags)
 +                      unsigned long flags, void *context)
  {
        struct coh901318_chan *cohc = to_coh901318_chan(chan);
        struct coh901318_lli *lli;
@@@ -1151,12 -1158,17 +1144,12 @@@ coh901318_tx_status(struct dma_chan *ch
                 struct dma_tx_state *txstate)
  {
        struct coh901318_chan *cohc = to_coh901318_chan(chan);
 -      dma_cookie_t last_used;
 -      dma_cookie_t last_complete;
 -      int ret;
 -
 -      last_complete = cohc->completed;
 -      last_used = chan->cookie;
 +      enum dma_status ret;
  
 -      ret = dma_async_is_complete(cookie, last_complete, last_used);
 +      ret = dma_cookie_status(chan, cookie, txstate);
 +      /* FIXME: should be conditional on ret != DMA_SUCCESS? */
 +      dma_set_residue(txstate, coh901318_get_bytes_left(chan));
  
 -      dma_set_tx_state(txstate, last_complete, last_used,
 -                       coh901318_get_bytes_left(chan));
        if (ret == DMA_IN_PROGRESS && cohc->stopped)
                ret = DMA_PAUSED;
  
index afee0e8ae714426ad787fbe1be7d372c888e87f0,8b72b4cd83d509d1f4c85d24e09b1fade830aaf9..feddefc42109b5fe891b82b0c1ed520a6b9e9613
@@@ -72,9 -72,9 +72,9 @@@ static int pm860x_rtc_alarm_irq_enable(
        struct pm860x_rtc_info *info = dev_get_drvdata(dev);
  
        if (enabled)
-               pm860x_set_bits(info->i2c, PM8607_RTC1, ALARM, ALARM);
+               pm860x_set_bits(info->i2c, PM8607_RTC1, ALARM_EN, ALARM_EN);
        else
-               pm860x_set_bits(info->i2c, PM8607_RTC1, ALARM, 0);
+               pm860x_set_bits(info->i2c, PM8607_RTC1, ALARM_EN, 0);
        return 0;
  }
  
@@@ -376,9 -376,6 +376,9 @@@ static int __devinit pm860x_rtc_probe(s
        INIT_DELAYED_WORK(&info->calib_work, calibrate_vrtc_work);
        schedule_delayed_work(&info->calib_work, VRTC_CALIB_INTERVAL);
  #endif        /* VRTC_CALIBRATION */
 +
 +      device_init_wakeup(&pdev->dev, 1);
 +
        return 0;
  out_rtc:
        free_irq(info->irq, info);
@@@ -404,34 -401,10 +404,34 @@@ static int __devexit pm860x_rtc_remove(
        return 0;
  }
  
 +#ifdef CONFIG_PM_SLEEP
 +static int pm860x_rtc_suspend(struct device *dev)
 +{
 +      struct platform_device *pdev = to_platform_device(dev);
 +      struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
 +
 +      if (device_may_wakeup(dev))
 +              chip->wakeup_flag |= 1 << PM8607_IRQ_RTC;
 +      return 0;
 +}
 +static int pm860x_rtc_resume(struct device *dev)
 +{
 +      struct platform_device *pdev = to_platform_device(dev);
 +      struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
 +
 +      if (device_may_wakeup(dev))
 +              chip->wakeup_flag &= ~(1 << PM8607_IRQ_RTC);
 +      return 0;
 +}
 +#endif
 +
 +static SIMPLE_DEV_PM_OPS(pm860x_rtc_pm_ops, pm860x_rtc_suspend, pm860x_rtc_resume);
 +
  static struct platform_driver pm860x_rtc_driver = {
        .driver         = {
                .name   = "88pm860x-rtc",
                .owner  = THIS_MODULE,
 +              .pm     = &pm860x_rtc_pm_ops,
        },
        .probe          = pm860x_rtc_probe,
        .remove         = __devexit_p(pm860x_rtc_remove),
index 5bdf2eecb1782dd4c33f863607d045ed27535fe9,34f7cf76bf4f609c7b0154626870506438bf353d..af04b0d6688dbb19400fbf498781b37bb92ea420
@@@ -1,7 -1,7 +1,7 @@@
  /*******************************************************************
   * This file is part of the Emulex Linux Device Driver for         *
   * Fibre Channel Host Bus Adapters.                                *
 - * Copyright (C) 2007-2011 Emulex.  All rights reserved.           *
 + * Copyright (C) 2007-2012 Emulex.  All rights reserved.           *
   * EMULEX and SLI are trademarks of Emulex.                        *
   * www.emulex.com                                                  *
   *                                                                 *
@@@ -997,48 -997,31 +997,41 @@@ lpfc_debugfs_dumpDataDif_write(struct f
        return nbytes;
  }
  
- static int
- lpfc_debugfs_dif_err_open(struct inode *inode, struct file *file)
- {
-       file->private_data = inode->i_private;
-       return 0;
- }
  static ssize_t
  lpfc_debugfs_dif_err_read(struct file *file, char __user *buf,
        size_t nbytes, loff_t *ppos)
  {
        struct dentry *dent = file->f_dentry;
        struct lpfc_hba *phba = file->private_data;
 -      char cbuf[16];
 +      char cbuf[32];
 +      uint64_t tmp = 0;
        int cnt = 0;
  
        if (dent == phba->debug_writeGuard)
 -              cnt = snprintf(cbuf, 16, "%u\n", phba->lpfc_injerr_wgrd_cnt);
 +              cnt = snprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_wgrd_cnt);
        else if (dent == phba->debug_writeApp)
 -              cnt = snprintf(cbuf, 16, "%u\n", phba->lpfc_injerr_wapp_cnt);
 +              cnt = snprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_wapp_cnt);
        else if (dent == phba->debug_writeRef)
 -              cnt = snprintf(cbuf, 16, "%u\n", phba->lpfc_injerr_wref_cnt);
 +              cnt = snprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_wref_cnt);
        else if (dent == phba->debug_readGuard)
 -              cnt = snprintf(cbuf, 16, "%u\n", phba->lpfc_injerr_rgrd_cnt);
 +              cnt = snprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_rgrd_cnt);
        else if (dent == phba->debug_readApp)
 -              cnt = snprintf(cbuf, 16, "%u\n", phba->lpfc_injerr_rapp_cnt);
 +              cnt = snprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_rapp_cnt);
        else if (dent == phba->debug_readRef)
 -              cnt = snprintf(cbuf, 16, "%u\n", phba->lpfc_injerr_rref_cnt);
 -      else if (dent == phba->debug_InjErrLBA)
 -              cnt = snprintf(cbuf, 16, "0x%lx\n",
 -                               (unsigned long) phba->lpfc_injerr_lba);
 -      else
 +              cnt = snprintf(cbuf, 32, "%u\n", phba->lpfc_injerr_rref_cnt);
 +      else if (dent == phba->debug_InjErrNPortID)
 +              cnt = snprintf(cbuf, 32, "0x%06x\n", phba->lpfc_injerr_nportid);
 +      else if (dent == phba->debug_InjErrWWPN) {
 +              memcpy(&tmp, &phba->lpfc_injerr_wwpn, sizeof(struct lpfc_name));
 +              tmp = cpu_to_be64(tmp);
 +              cnt = snprintf(cbuf, 32, "0x%016llx\n", tmp);
 +      } else if (dent == phba->debug_InjErrLBA) {
 +              if (phba->lpfc_injerr_lba == (sector_t)(-1))
 +                      cnt = snprintf(cbuf, 32, "off\n");
 +              else
 +                      cnt = snprintf(cbuf, 32, "0x%llx\n",
 +                               (uint64_t) phba->lpfc_injerr_lba);
 +      } else
                lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
                         "0547 Unknown debugfs error injection entry\n");
  
@@@ -1052,7 -1035,7 +1045,7 @@@ lpfc_debugfs_dif_err_write(struct file 
        struct dentry *dent = file->f_dentry;
        struct lpfc_hba *phba = file->private_data;
        char dstbuf[32];
 -      unsigned long tmp;
 +      uint64_t tmp = 0;
        int size;
  
        memset(dstbuf, 0, 32);
        if (copy_from_user(dstbuf, buf, size))
                return 0;
  
 -      if (strict_strtoul(dstbuf, 0, &tmp))
 +      if (dent == phba->debug_InjErrLBA) {
 +              if ((buf[0] == 'o') && (buf[1] == 'f') && (buf[2] == 'f'))
 +                      tmp = (uint64_t)(-1);
 +      }
 +
 +      if ((tmp == 0) && (kstrtoull(dstbuf, 0, &tmp)))
                return 0;
  
        if (dent == phba->debug_writeGuard)
                phba->lpfc_injerr_rref_cnt = (uint32_t)tmp;
        else if (dent == phba->debug_InjErrLBA)
                phba->lpfc_injerr_lba = (sector_t)tmp;
 -      else
 +      else if (dent == phba->debug_InjErrNPortID)
 +              phba->lpfc_injerr_nportid = (uint32_t)(tmp & Mask_DID);
 +      else if (dent == phba->debug_InjErrWWPN) {
 +              tmp = cpu_to_be64(tmp);
 +              memcpy(&phba->lpfc_injerr_wwpn, &tmp, sizeof(struct lpfc_name));
 +      } else
                lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
                         "0548 Unknown debugfs error injection entry\n");
  
@@@ -3541,7 -3514,7 +3534,7 @@@ static const struct file_operations lpf
  #undef lpfc_debugfs_op_dif_err
  static const struct file_operations lpfc_debugfs_op_dif_err = {
        .owner =        THIS_MODULE,
-       .open =         lpfc_debugfs_dif_err_open,
+       .open =         simple_open,
        .llseek =       lpfc_debugfs_lseek,
        .read =         lpfc_debugfs_dif_err_read,
        .write =        lpfc_debugfs_dif_err_write,
@@@ -3969,28 -3942,6 +3962,28 @@@ lpfc_debugfs_initialize(struct lpfc_vpo
                }
                phba->lpfc_injerr_lba = LPFC_INJERR_LBA_OFF;
  
 +              snprintf(name, sizeof(name), "InjErrNPortID");
 +              phba->debug_InjErrNPortID =
 +                      debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
 +                      phba->hba_debugfs_root,
 +                      phba, &lpfc_debugfs_op_dif_err);
 +              if (!phba->debug_InjErrNPortID) {
 +                      lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
 +                              "0809 Cannot create debugfs InjErrNPortID\n");
 +                      goto debug_failed;
 +              }
 +
 +              snprintf(name, sizeof(name), "InjErrWWPN");
 +              phba->debug_InjErrWWPN =
 +                      debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
 +                      phba->hba_debugfs_root,
 +                      phba, &lpfc_debugfs_op_dif_err);
 +              if (!phba->debug_InjErrWWPN) {
 +                      lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
 +                              "0810 Cannot create debugfs InjErrWWPN\n");
 +                      goto debug_failed;
 +              }
 +
                snprintf(name, sizeof(name), "writeGuardInjErr");
                phba->debug_writeGuard =
                        debugfs_create_file(name, S_IFREG|S_IRUGO|S_IWUSR,
@@@ -4363,14 -4314,6 +4356,14 @@@ lpfc_debugfs_terminate(struct lpfc_vpor
                        debugfs_remove(phba->debug_InjErrLBA); /* InjErrLBA */
                        phba->debug_InjErrLBA = NULL;
                }
 +              if (phba->debug_InjErrNPortID) {         /* InjErrNPortID */
 +                      debugfs_remove(phba->debug_InjErrNPortID);
 +                      phba->debug_InjErrNPortID = NULL;
 +              }
 +              if (phba->debug_InjErrWWPN) {
 +                      debugfs_remove(phba->debug_InjErrWWPN); /* InjErrWWPN */
 +                      phba->debug_InjErrWWPN = NULL;
 +              }
                if (phba->debug_writeGuard) {
                        debugfs_remove(phba->debug_writeGuard); /* writeGuard */
                        phba->debug_writeGuard = NULL;
index e825460478befc40ad9e9a4d36243fa741a48cf0,46ec722b440603184b35466e89ec795185811066..08b9962b8fdab8813bbb453f120870eb1fbb96d3
@@@ -304,11 -304,7 +304,7 @@@ static const int trigger_level_1[4] = 
  #ifdef CONFIG_DEBUG_FS
  
  #define PCH_REGS_BUFSIZE      1024
- static int pch_show_regs_open(struct inode *inode, struct file *file)
- {
-       file->private_data = inode->i_private;
-       return 0;
- }
  
  static ssize_t port_show_regs(struct file *file, char __user *user_buf,
                                size_t count, loff_t *ppos)
  
  static const struct file_operations port_regs_ops = {
        .owner          = THIS_MODULE,
-       .open           = pch_show_regs_open,
+       .open           = simple_open,
        .read           = port_show_regs,
        .llseek         = default_llseek,
  };
@@@ -844,7 -840,7 +840,7 @@@ static int dma_handle_rx(struct eg20t_p
  
        sg_dma_address(sg) = priv->rx_buf_dma;
  
 -      desc = priv->chan_rx->device->device_prep_slave_sg(priv->chan_rx,
 +      desc = dmaengine_prep_slave_sg(priv->chan_rx,
                        sg, 1, DMA_DEV_TO_MEM,
                        DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
  
@@@ -1003,7 -999,7 +999,7 @@@ static unsigned int dma_handle_tx(struc
                        sg_dma_len(sg) = size;
        }
  
 -      desc = priv->chan_tx->device->device_prep_slave_sg(priv->chan_tx,
 +      desc = dmaengine_prep_slave_sg(priv->chan_tx,
                                        priv->sg_tx_p, nent, DMA_MEM_TO_DEV,
                                        DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
        if (!desc) {
diff --combined fs/pstore/inode.c
index 50952c9bd06c0c460097eeedface267575f11aa5,8ae5a03376aea859bdd4f8db90e1b9f706d2df17..19507889bb7ff123b3922fa439fc0c8ef1ded913
@@@ -52,12 -52,6 +52,6 @@@ struct pstore_private 
        char    data[];
  };
  
- static int pstore_file_open(struct inode *inode, struct file *file)
- {
-       file->private_data = inode->i_private;
-       return 0;
- }
  static ssize_t pstore_file_read(struct file *file, char __user *userbuf,
                                                size_t count, loff_t *ppos)
  {
@@@ -67,7 -61,7 +61,7 @@@
  }
  
  static const struct file_operations pstore_file_operations = {
-       .open   = pstore_file_open,
+       .open   = simple_open,
        .read   = pstore_file_read,
        .llseek = default_llseek,
  };
@@@ -105,12 -99,26 +99,12 @@@ static const struct inode_operations ps
        .unlink         = pstore_unlink,
  };
  
 -static struct inode *pstore_get_inode(struct super_block *sb,
 -                                      const struct inode *dir, int mode, dev_t dev)
 +static struct inode *pstore_get_inode(struct super_block *sb)
  {
        struct inode *inode = new_inode(sb);
 -
        if (inode) {
                inode->i_ino = get_next_ino();
 -              inode->i_uid = inode->i_gid = 0;
 -              inode->i_mode = mode;
                inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
 -              switch (mode & S_IFMT) {
 -              case S_IFREG:
 -                      inode->i_fop = &pstore_file_operations;
 -                      break;
 -              case S_IFDIR:
 -                      inode->i_op = &pstore_dir_inode_operations;
 -                      inode->i_fop = &simple_dir_operations;
 -                      inc_nlink(inode);
 -                      break;
 -              }
        }
        return inode;
  }
@@@ -202,11 -210,9 +196,11 @@@ int pstore_mkfile(enum pstore_type_id t
                return rc;
  
        rc = -ENOMEM;
 -      inode = pstore_get_inode(pstore_sb, root->d_inode, S_IFREG | 0444, 0);
 +      inode = pstore_get_inode(pstore_sb);
        if (!inode)
                goto fail;
 +      inode->i_mode = S_IFREG | 0444;
 +      inode->i_fop = &pstore_file_operations;
        private = kmalloc(sizeof *private + size, GFP_KERNEL);
        if (!private)
                goto fail_alloc;
@@@ -281,12 -287,10 +275,12 @@@ int pstore_fill_super(struct super_bloc
  
        parse_options(data);
  
 -      inode = pstore_get_inode(sb, NULL, S_IFDIR | 0755, 0);
 +      inode = pstore_get_inode(sb);
        if (inode) {
 -              /* override ramfs "dir" options so we catch unlink(2) */
 +              inode->i_mode = S_IFDIR | 0755;
                inode->i_op = &pstore_dir_inode_operations;
 +              inode->i_fop = &simple_dir_operations;
 +              inc_nlink(inode);
        }
        sb->s_root = d_make_root(inode);
        if (!sb->s_root)
diff --combined include/linux/fs.h
index 528611843ba0f5543880a953dc38e71a32cbb3f6,c64c31d3ab2ceb60fe72c111073623f8f218de34..8de675523e464db26c649928610fb4a69bac7a40
@@@ -92,10 -92,6 +92,10 @@@ struct inodes_stat_t 
  /* File is opened using open(.., 3, ..) and is writeable only for ioctls
     (specialy hack for floppy.c) */
  #define FMODE_WRITE_IOCTL     ((__force fmode_t)0x100)
 +/* 32bit hashes as llseek() offset (for directories) */
 +#define FMODE_32BITHASH         ((__force fmode_t)0x200)
 +/* 64bit hashes as llseek() offset (for directories) */
 +#define FMODE_64BITHASH         ((__force fmode_t)0x400)
  
  /*
   * Don't update ctime and mtime.
@@@ -1215,7 -1211,6 +1215,7 @@@ extern int vfs_setlease(struct file *, 
  extern int lease_modify(struct file_lock **, int);
  extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
  extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
 +extern void locks_delete_block(struct file_lock *waiter);
  extern void lock_flocks(void);
  extern void unlock_flocks(void);
  #else /* !CONFIG_FILE_LOCKING */
@@@ -1360,10 -1355,6 +1360,10 @@@ static inline int lock_may_write(struc
        return 1;
  }
  
 +static inline void locks_delete_block(struct file_lock *waiter)
 +{
 +}
 +
  static inline void lock_flocks(void)
  {
  }
@@@ -2511,6 -2502,7 +2511,7 @@@ extern int dcache_readdir(struct file *
  extern int simple_setattr(struct dentry *, struct iattr *);
  extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
  extern int simple_statfs(struct dentry *, struct kstatfs *);
+ extern int simple_open(struct inode *inode, struct file *file);
  extern int simple_link(struct dentry *, struct inode *, struct dentry *);
  extern int simple_unlink(struct inode *, struct dentry *);
  extern int simple_rmdir(struct inode *, struct dentry *);
This page took 0.146679 seconds and 4 git commands to generate.