diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 42 | ||||
-rw-r--r-- | fs/ext3/super.c | 26 |
3 files changed, 59 insertions, 13 deletions
@@ -371,8 +371,8 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve | |||
371 | 371 | ||
372 | # Files to ignore in find ... statements | 372 | # Files to ignore in find ... statements |
373 | 373 | ||
374 | RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg \) -prune -o | 374 | RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg -o -name .git \) -prune -o |
375 | export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg | 375 | export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git |
376 | 376 | ||
377 | # =========================================================================== | 377 | # =========================================================================== |
378 | # Rules shared between *config targets and build targets | 378 | # Rules shared between *config targets and build targets |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index db9f952f9e3c..ec6ab65f0872 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -151,6 +151,40 @@ static void exca_writew(struct yenta_socket *socket, unsigned reg, u16 val) | |||
151 | readb(socket->base + 0x800 + reg + 1); | 151 | readb(socket->base + 0x800 + reg + 1); |
152 | } | 152 | } |
153 | 153 | ||
154 | static ssize_t show_yenta_registers(struct device *yentadev, struct device_attribute *attr, char *buf) | ||
155 | { | ||
156 | struct pci_dev *dev = to_pci_dev(yentadev); | ||
157 | struct yenta_socket *socket = pci_get_drvdata(dev); | ||
158 | int offset = 0, i; | ||
159 | |||
160 | offset = snprintf(buf, PAGE_SIZE, "CB registers:"); | ||
161 | for (i = 0; i < 0x24; i += 4) { | ||
162 | unsigned val; | ||
163 | if (!(i & 15)) | ||
164 | offset += snprintf(buf + offset, PAGE_SIZE - offset, "\n%02x:", i); | ||
165 | val = cb_readl(socket, i); | ||
166 | offset += snprintf(buf + offset, PAGE_SIZE - offset, " %08x", val); | ||
167 | } | ||
168 | |||
169 | offset += snprintf(buf + offset, PAGE_SIZE - offset, "\n\nExCA registers:"); | ||
170 | for (i = 0; i < 0x45; i++) { | ||
171 | unsigned char val; | ||
172 | if (!(i & 7)) { | ||
173 | if (i & 8) { | ||
174 | memcpy(buf + offset, " -", 2); | ||
175 | offset += 2; | ||
176 | } else | ||
177 | offset += snprintf(buf + offset, PAGE_SIZE - offset, "\n%02x:", i); | ||
178 | } | ||
179 | val = exca_readb(socket, i); | ||
180 | offset += snprintf(buf + offset, PAGE_SIZE - offset, " %02x", val); | ||
181 | } | ||
182 | buf[offset++] = '\n'; | ||
183 | return offset; | ||
184 | } | ||
185 | |||
186 | static DEVICE_ATTR(yenta_registers, S_IRUSR, show_yenta_registers, NULL); | ||
187 | |||
154 | /* | 188 | /* |
155 | * Ugh, mixed-mode cardbus and 16-bit pccard state: things depend | 189 | * Ugh, mixed-mode cardbus and 16-bit pccard state: things depend |
156 | * on what kind of card is inserted.. | 190 | * on what kind of card is inserted.. |
@@ -765,6 +799,9 @@ static void yenta_close(struct pci_dev *dev) | |||
765 | { | 799 | { |
766 | struct yenta_socket *sock = pci_get_drvdata(dev); | 800 | struct yenta_socket *sock = pci_get_drvdata(dev); |
767 | 801 | ||
802 | /* Remove the register attributes */ | ||
803 | device_remove_file(&dev->dev, &dev_attr_yenta_registers); | ||
804 | |||
768 | /* we don't want a dying socket registered */ | 805 | /* we don't want a dying socket registered */ |
769 | pcmcia_unregister_socket(&sock->socket); | 806 | pcmcia_unregister_socket(&sock->socket); |
770 | 807 | ||
@@ -1138,8 +1175,11 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i | |||
1138 | 1175 | ||
1139 | /* Register it with the pcmcia layer.. */ | 1176 | /* Register it with the pcmcia layer.. */ |
1140 | ret = pcmcia_register_socket(&socket->socket); | 1177 | ret = pcmcia_register_socket(&socket->socket); |
1141 | if (ret == 0) | 1178 | if (ret == 0) { |
1179 | /* Add the yenta register attributes */ | ||
1180 | device_create_file(&dev->dev, &dev_attr_yenta_registers); | ||
1142 | goto out; | 1181 | goto out; |
1182 | } | ||
1143 | 1183 | ||
1144 | unmap: | 1184 | unmap: |
1145 | iounmap(socket->base); | 1185 | iounmap(socket->base); |
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 9e24ceb019fe..097383c11154 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -510,19 +510,11 @@ static void ext3_clear_inode(struct inode *inode) | |||
510 | kfree(rsv); | 510 | kfree(rsv); |
511 | } | 511 | } |
512 | 512 | ||
513 | static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs) | 513 | static inline void ext3_show_quota_options(struct seq_file *seq, struct super_block *sb) |
514 | { | 514 | { |
515 | struct super_block *sb = vfs->mnt_sb; | 515 | #if defined(CONFIG_QUOTA) |
516 | struct ext3_sb_info *sbi = EXT3_SB(sb); | 516 | struct ext3_sb_info *sbi = EXT3_SB(sb); |
517 | 517 | ||
518 | if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA) | ||
519 | seq_puts(seq, ",data=journal"); | ||
520 | else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA) | ||
521 | seq_puts(seq, ",data=ordered"); | ||
522 | else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA) | ||
523 | seq_puts(seq, ",data=writeback"); | ||
524 | |||
525 | #if defined(CONFIG_QUOTA) | ||
526 | if (sbi->s_jquota_fmt) | 518 | if (sbi->s_jquota_fmt) |
527 | seq_printf(seq, ",jqfmt=%s", | 519 | seq_printf(seq, ",jqfmt=%s", |
528 | (sbi->s_jquota_fmt == QFMT_VFS_OLD) ? "vfsold": "vfsv0"); | 520 | (sbi->s_jquota_fmt == QFMT_VFS_OLD) ? "vfsold": "vfsv0"); |
@@ -539,6 +531,20 @@ static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs) | |||
539 | if (sbi->s_mount_opt & EXT3_MOUNT_GRPQUOTA) | 531 | if (sbi->s_mount_opt & EXT3_MOUNT_GRPQUOTA) |
540 | seq_puts(seq, ",grpquota"); | 532 | seq_puts(seq, ",grpquota"); |
541 | #endif | 533 | #endif |
534 | } | ||
535 | |||
536 | static int ext3_show_options(struct seq_file *seq, struct vfsmount *vfs) | ||
537 | { | ||
538 | struct super_block *sb = vfs->mnt_sb; | ||
539 | |||
540 | if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA) | ||
541 | seq_puts(seq, ",data=journal"); | ||
542 | else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA) | ||
543 | seq_puts(seq, ",data=ordered"); | ||
544 | else if (test_opt(sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA) | ||
545 | seq_puts(seq, ",data=writeback"); | ||
546 | |||
547 | ext3_show_quota_options(seq, sb); | ||
542 | 548 | ||
543 | return 0; | 549 | return 0; |
544 | } | 550 | } |