aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-03 11:57:16 -0500
committerTakashi Iwai <tiwai@suse.de>2015-02-03 11:57:16 -0500
commit3fe9cf390f6dc84f76b112b0a660967a84f9a81b (patch)
tree18b8573687ae8131db155aa791f4d2357d91e6c5 /include
parent6ccd93bdb989507717edb375d40534f1177822c5 (diff)
parent830953c0724b42be30a74febcde6c89c706ed286 (diff)
Merge branch 'topic/snd-device' into for-next
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c.h6
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/linux/mfd/samsung/s2mps13.h2
-rw-r--r--include/linux/mm.h6
-rw-r--r--include/linux/oom.h5
-rw-r--r--include/linux/perf_event.h6
-rw-r--r--include/linux/printk.h15
-rw-r--r--include/linux/quota.h47
-rw-r--r--include/linux/quotaops.h4
-rw-r--r--include/net/ip.h11
-rw-r--r--include/sound/compress_driver.h4
-rw-r--r--include/sound/control.h11
-rw-r--r--include/sound/core.h41
-rw-r--r--include/sound/hwdep.h3
-rw-r--r--include/sound/pcm.h2
-rw-r--r--include/sound/rawmidi.h4
16 files changed, 100 insertions, 69 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index e3a1721c8354..7c7695940ddd 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -228,7 +228,9 @@ struct i2c_client {
228 struct device dev; /* the device structure */ 228 struct device dev; /* the device structure */
229 int irq; /* irq issued by device */ 229 int irq; /* irq issued by device */
230 struct list_head detected; 230 struct list_head detected;
231#if IS_ENABLED(CONFIG_I2C_SLAVE)
231 i2c_slave_cb_t slave_cb; /* callback for slave mode */ 232 i2c_slave_cb_t slave_cb; /* callback for slave mode */
233#endif
232}; 234};
233#define to_i2c_client(d) container_of(d, struct i2c_client, dev) 235#define to_i2c_client(d) container_of(d, struct i2c_client, dev)
234 236
@@ -253,6 +255,7 @@ static inline void i2c_set_clientdata(struct i2c_client *dev, void *data)
253 255
254/* I2C slave support */ 256/* I2C slave support */
255 257
258#if IS_ENABLED(CONFIG_I2C_SLAVE)
256enum i2c_slave_event { 259enum i2c_slave_event {
257 I2C_SLAVE_REQ_READ_START, 260 I2C_SLAVE_REQ_READ_START,
258 I2C_SLAVE_REQ_READ_END, 261 I2C_SLAVE_REQ_READ_END,
@@ -269,6 +272,7 @@ static inline int i2c_slave_event(struct i2c_client *client,
269{ 272{
270 return client->slave_cb(client, event, val); 273 return client->slave_cb(client, event, val);
271} 274}
275#endif
272 276
273/** 277/**
274 * struct i2c_board_info - template for device creation 278 * struct i2c_board_info - template for device creation
@@ -404,8 +408,10 @@ struct i2c_algorithm {
404 /* To determine what the adapter supports */ 408 /* To determine what the adapter supports */
405 u32 (*functionality) (struct i2c_adapter *); 409 u32 (*functionality) (struct i2c_adapter *);
406 410
411#if IS_ENABLED(CONFIG_I2C_SLAVE)
407 int (*reg_slave)(struct i2c_client *client); 412 int (*reg_slave)(struct i2c_client *client);
408 int (*unreg_slave)(struct i2c_client *client); 413 int (*unreg_slave)(struct i2c_client *client);
414#endif
409}; 415};
410 416
411/** 417/**
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 5449d2f4a1ef..64ce58bee6f5 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -176,7 +176,7 @@ extern int _cond_resched(void);
176 */ 176 */
177# define might_sleep() \ 177# define might_sleep() \
178 do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) 178 do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0)
179# define sched_annotate_sleep() __set_current_state(TASK_RUNNING) 179# define sched_annotate_sleep() (current->task_state_change = 0)
180#else 180#else
181 static inline void ___might_sleep(const char *file, int line, 181 static inline void ___might_sleep(const char *file, int line,
182 int preempt_offset) { } 182 int preempt_offset) { }
diff --git a/include/linux/mfd/samsung/s2mps13.h b/include/linux/mfd/samsung/s2mps13.h
index ce5dda8958fe..b1fd675fa36f 100644
--- a/include/linux/mfd/samsung/s2mps13.h
+++ b/include/linux/mfd/samsung/s2mps13.h
@@ -59,6 +59,7 @@ enum s2mps13_reg {
59 S2MPS13_REG_B6CTRL, 59 S2MPS13_REG_B6CTRL,
60 S2MPS13_REG_B6OUT, 60 S2MPS13_REG_B6OUT,
61 S2MPS13_REG_B7CTRL, 61 S2MPS13_REG_B7CTRL,
62 S2MPS13_REG_B7SW,
62 S2MPS13_REG_B7OUT, 63 S2MPS13_REG_B7OUT,
63 S2MPS13_REG_B8CTRL, 64 S2MPS13_REG_B8CTRL,
64 S2MPS13_REG_B8OUT, 65 S2MPS13_REG_B8OUT,
@@ -102,6 +103,7 @@ enum s2mps13_reg {
102 S2MPS13_REG_L26CTRL, 103 S2MPS13_REG_L26CTRL,
103 S2MPS13_REG_L27CTRL, 104 S2MPS13_REG_L27CTRL,
104 S2MPS13_REG_L28CTRL, 105 S2MPS13_REG_L28CTRL,
106 S2MPS13_REG_L29CTRL,
105 S2MPS13_REG_L30CTRL, 107 S2MPS13_REG_L30CTRL,
106 S2MPS13_REG_L31CTRL, 108 S2MPS13_REG_L31CTRL,
107 S2MPS13_REG_L32CTRL, 109 S2MPS13_REG_L32CTRL,
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 80fc92a49649..dd5ea3016fc4 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1070,6 +1070,7 @@ static inline int page_mapped(struct page *page)
1070#define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */ 1070#define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */
1071#define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */ 1071#define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */
1072#define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */ 1072#define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */
1073#define VM_FAULT_SIGSEGV 0x0040
1073 1074
1074#define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ 1075#define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */
1075#define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ 1076#define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */
@@ -1078,8 +1079,9 @@ static inline int page_mapped(struct page *page)
1078 1079
1079#define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ 1080#define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */
1080 1081
1081#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ 1082#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV | \
1082 VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE) 1083 VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE | \
1084 VM_FAULT_FALLBACK)
1083 1085
1084/* Encode hstate index for a hwpoisoned large page */ 1086/* Encode hstate index for a hwpoisoned large page */
1085#define VM_FAULT_SET_HINDEX(x) ((x) << 12) 1087#define VM_FAULT_SET_HINDEX(x) ((x) << 12)
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 853698c721f7..76200984d1e2 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -85,11 +85,6 @@ static inline void oom_killer_enable(void)
85 oom_killer_disabled = false; 85 oom_killer_disabled = false;
86} 86}
87 87
88static inline bool oom_gfp_allowed(gfp_t gfp_mask)
89{
90 return (gfp_mask & __GFP_FS) && !(gfp_mask & __GFP_NORETRY);
91}
92
93extern struct task_struct *find_lock_task_mm(struct task_struct *p); 88extern struct task_struct *find_lock_task_mm(struct task_struct *p);
94 89
95static inline bool task_will_free_mem(struct task_struct *task) 90static inline bool task_will_free_mem(struct task_struct *task)
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 4f7a61ca4b39..664de5a4ec46 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -450,11 +450,6 @@ struct perf_event {
450#endif /* CONFIG_PERF_EVENTS */ 450#endif /* CONFIG_PERF_EVENTS */
451}; 451};
452 452
453enum perf_event_context_type {
454 task_context,
455 cpu_context,
456};
457
458/** 453/**
459 * struct perf_event_context - event context structure 454 * struct perf_event_context - event context structure
460 * 455 *
@@ -462,7 +457,6 @@ enum perf_event_context_type {
462 */ 457 */
463struct perf_event_context { 458struct perf_event_context {
464 struct pmu *pmu; 459 struct pmu *pmu;
465 enum perf_event_context_type type;
466 /* 460 /*
467 * Protect the states of the events in the list, 461 * Protect the states of the events in the list,
468 * nr_active, and the list: 462 * nr_active, and the list:
diff --git a/include/linux/printk.h b/include/linux/printk.h
index c8f170324e64..4d5bf5726578 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -10,9 +10,6 @@
10extern const char linux_banner[]; 10extern const char linux_banner[];
11extern const char linux_proc_banner[]; 11extern const char linux_proc_banner[];
12 12
13extern char *log_buf_addr_get(void);
14extern u32 log_buf_len_get(void);
15
16static inline int printk_get_level(const char *buffer) 13static inline int printk_get_level(const char *buffer)
17{ 14{
18 if (buffer[0] == KERN_SOH_ASCII && buffer[1]) { 15 if (buffer[0] == KERN_SOH_ASCII && buffer[1]) {
@@ -163,6 +160,8 @@ extern int kptr_restrict;
163 160
164extern void wake_up_klogd(void); 161extern void wake_up_klogd(void);
165 162
163char *log_buf_addr_get(void);
164u32 log_buf_len_get(void);
166void log_buf_kexec_setup(void); 165void log_buf_kexec_setup(void);
167void __init setup_log_buf(int early); 166void __init setup_log_buf(int early);
168void dump_stack_set_arch_desc(const char *fmt, ...); 167void dump_stack_set_arch_desc(const char *fmt, ...);
@@ -198,6 +197,16 @@ static inline void wake_up_klogd(void)
198{ 197{
199} 198}
200 199
200static inline char *log_buf_addr_get(void)
201{
202 return NULL;
203}
204
205static inline u32 log_buf_len_get(void)
206{
207 return 0;
208}
209
201static inline void log_buf_kexec_setup(void) 210static inline void log_buf_kexec_setup(void)
202{ 211{
203} 212}
diff --git a/include/linux/quota.h b/include/linux/quota.h
index 50978b781a19..097d7eb2441e 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -321,6 +321,49 @@ struct dquot_operations {
321 321
322struct path; 322struct path;
323 323
324/* Structure for communicating via ->get_dqblk() & ->set_dqblk() */
325struct qc_dqblk {
326 int d_fieldmask; /* mask of fields to change in ->set_dqblk() */
327 u64 d_spc_hardlimit; /* absolute limit on used space */
328 u64 d_spc_softlimit; /* preferred limit on used space */
329 u64 d_ino_hardlimit; /* maximum # allocated inodes */
330 u64 d_ino_softlimit; /* preferred inode limit */
331 u64 d_space; /* Space owned by the user */
332 u64 d_ino_count; /* # inodes owned by the user */
333 s64 d_ino_timer; /* zero if within inode limits */
334 /* if not, we refuse service */
335 s64 d_spc_timer; /* similar to above; for space */
336 int d_ino_warns; /* # warnings issued wrt num inodes */
337 int d_spc_warns; /* # warnings issued wrt used space */
338 u64 d_rt_spc_hardlimit; /* absolute limit on realtime space */
339 u64 d_rt_spc_softlimit; /* preferred limit on RT space */
340 u64 d_rt_space; /* realtime space owned */
341 s64 d_rt_spc_timer; /* similar to above; for RT space */
342 int d_rt_spc_warns; /* # warnings issued wrt RT space */
343};
344
345/* Field specifiers for ->set_dqblk() in struct qc_dqblk */
346#define QC_INO_SOFT (1<<0)
347#define QC_INO_HARD (1<<1)
348#define QC_SPC_SOFT (1<<2)
349#define QC_SPC_HARD (1<<3)
350#define QC_RT_SPC_SOFT (1<<4)
351#define QC_RT_SPC_HARD (1<<5)
352#define QC_LIMIT_MASK (QC_INO_SOFT | QC_INO_HARD | QC_SPC_SOFT | QC_SPC_HARD | \
353 QC_RT_SPC_SOFT | QC_RT_SPC_HARD)
354#define QC_SPC_TIMER (1<<6)
355#define QC_INO_TIMER (1<<7)
356#define QC_RT_SPC_TIMER (1<<8)
357#define QC_TIMER_MASK (QC_SPC_TIMER | QC_INO_TIMER | QC_RT_SPC_TIMER)
358#define QC_SPC_WARNS (1<<9)
359#define QC_INO_WARNS (1<<10)
360#define QC_RT_SPC_WARNS (1<<11)
361#define QC_WARNS_MASK (QC_SPC_WARNS | QC_INO_WARNS | QC_RT_SPC_WARNS)
362#define QC_SPACE (1<<12)
363#define QC_INO_COUNT (1<<13)
364#define QC_RT_SPACE (1<<14)
365#define QC_ACCT_MASK (QC_SPACE | QC_INO_COUNT | QC_RT_SPACE)
366
324/* Operations handling requests from userspace */ 367/* Operations handling requests from userspace */
325struct quotactl_ops { 368struct quotactl_ops {
326 int (*quota_on)(struct super_block *, int, int, struct path *); 369 int (*quota_on)(struct super_block *, int, int, struct path *);
@@ -329,8 +372,8 @@ struct quotactl_ops {
329 int (*quota_sync)(struct super_block *, int); 372 int (*quota_sync)(struct super_block *, int);
330 int (*get_info)(struct super_block *, int, struct if_dqinfo *); 373 int (*get_info)(struct super_block *, int, struct if_dqinfo *);
331 int (*set_info)(struct super_block *, int, struct if_dqinfo *); 374 int (*set_info)(struct super_block *, int, struct if_dqinfo *);
332 int (*get_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); 375 int (*get_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *);
333 int (*set_dqblk)(struct super_block *, struct kqid, struct fs_disk_quota *); 376 int (*set_dqblk)(struct super_block *, struct kqid, struct qc_dqblk *);
334 int (*get_xstate)(struct super_block *, struct fs_quota_stat *); 377 int (*get_xstate)(struct super_block *, struct fs_quota_stat *);
335 int (*set_xstate)(struct super_block *, unsigned int, int); 378 int (*set_xstate)(struct super_block *, unsigned int, int);
336 int (*get_xstatev)(struct super_block *, struct fs_quota_statv *); 379 int (*get_xstatev)(struct super_block *, struct fs_quota_statv *);
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index f23538a6e411..29e3455f7d41 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -98,9 +98,9 @@ int dquot_quota_sync(struct super_block *sb, int type);
98int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 98int dquot_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
99int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii); 99int dquot_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
100int dquot_get_dqblk(struct super_block *sb, struct kqid id, 100int dquot_get_dqblk(struct super_block *sb, struct kqid id,
101 struct fs_disk_quota *di); 101 struct qc_dqblk *di);
102int dquot_set_dqblk(struct super_block *sb, struct kqid id, 102int dquot_set_dqblk(struct super_block *sb, struct kqid id,
103 struct fs_disk_quota *di); 103 struct qc_dqblk *di);
104 104
105int __dquot_transfer(struct inode *inode, struct dquot **transfer_to); 105int __dquot_transfer(struct inode *inode, struct dquot **transfer_to);
106int dquot_transfer(struct inode *inode, struct iattr *iattr); 106int dquot_transfer(struct inode *inode, struct iattr *iattr);
diff --git a/include/net/ip.h b/include/net/ip.h
index 0bb620702929..f7cbd703d15d 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -39,11 +39,12 @@ struct inet_skb_parm {
39 struct ip_options opt; /* Compiled IP options */ 39 struct ip_options opt; /* Compiled IP options */
40 unsigned char flags; 40 unsigned char flags;
41 41
42#define IPSKB_FORWARDED 1 42#define IPSKB_FORWARDED BIT(0)
43#define IPSKB_XFRM_TUNNEL_SIZE 2 43#define IPSKB_XFRM_TUNNEL_SIZE BIT(1)
44#define IPSKB_XFRM_TRANSFORMED 4 44#define IPSKB_XFRM_TRANSFORMED BIT(2)
45#define IPSKB_FRAG_COMPLETE 8 45#define IPSKB_FRAG_COMPLETE BIT(3)
46#define IPSKB_REROUTED 16 46#define IPSKB_REROUTED BIT(4)
47#define IPSKB_DOREDIRECT BIT(5)
47 48
48 u16 frag_max_size; 49 u16 frag_max_size;
49}; 50};
diff --git a/include/sound/compress_driver.h b/include/sound/compress_driver.h
index 1e2531058b7e..f48089d364c5 100644
--- a/include/sound/compress_driver.h
+++ b/include/sound/compress_driver.h
@@ -135,7 +135,7 @@ struct snd_compr_ops {
135/** 135/**
136 * struct snd_compr: Compressed device 136 * struct snd_compr: Compressed device
137 * @name: DSP device name 137 * @name: DSP device name
138 * @dev: Device pointer 138 * @dev: associated device instance
139 * @ops: pointer to DSP callbacks 139 * @ops: pointer to DSP callbacks
140 * @private_data: pointer to DSP pvt data 140 * @private_data: pointer to DSP pvt data
141 * @card: sound card pointer 141 * @card: sound card pointer
@@ -145,7 +145,7 @@ struct snd_compr_ops {
145 */ 145 */
146struct snd_compr { 146struct snd_compr {
147 const char *name; 147 const char *name;
148 struct device *dev; 148 struct device dev;
149 struct snd_compr_ops *ops; 149 struct snd_compr_ops *ops;
150 void *private_data; 150 void *private_data;
151 struct snd_card *card; 151 struct snd_card *card;
diff --git a/include/sound/control.h b/include/sound/control.h
index 042613938a1d..75f3054023f7 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -93,12 +93,17 @@ struct snd_kctl_event {
93 93
94struct pid; 94struct pid;
95 95
96enum {
97 SND_CTL_SUBDEV_PCM,
98 SND_CTL_SUBDEV_RAWMIDI,
99 SND_CTL_SUBDEV_ITEMS,
100};
101
96struct snd_ctl_file { 102struct snd_ctl_file {
97 struct list_head list; /* list of all control files */ 103 struct list_head list; /* list of all control files */
98 struct snd_card *card; 104 struct snd_card *card;
99 struct pid *pid; 105 struct pid *pid;
100 int prefer_pcm_subdevice; 106 int preferred_subdevice[SND_CTL_SUBDEV_ITEMS];
101 int prefer_rawmidi_subdevice;
102 wait_queue_head_t change_sleep; 107 wait_queue_head_t change_sleep;
103 spinlock_t read_lock; 108 spinlock_t read_lock;
104 struct fasync_struct *fasync; 109 struct fasync_struct *fasync;
@@ -138,6 +143,8 @@ int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn);
138#define snd_ctl_unregister_ioctl_compat(fcn) 143#define snd_ctl_unregister_ioctl_compat(fcn)
139#endif 144#endif
140 145
146int snd_ctl_get_preferred_subdevice(struct snd_card *card, int type);
147
141static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id) 148static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
142{ 149{
143 return id->numid - kctl->id.numid; 150 return id->numid - kctl->id.numid;
diff --git a/include/sound/core.h b/include/sound/core.h
index 1df3f2fe5350..58882bfacdd7 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -109,6 +109,7 @@ struct snd_card {
109 private data */ 109 private data */
110 struct list_head devices; /* devices */ 110 struct list_head devices; /* devices */
111 111
112 struct device ctl_dev; /* control device */
112 unsigned int last_numid; /* last used numeric ID */ 113 unsigned int last_numid; /* last used numeric ID */
113 struct rw_semaphore controls_rwsem; /* controls list lock */ 114 struct rw_semaphore controls_rwsem; /* controls list lock */
114 rwlock_t ctl_files_rwlock; /* ctl_files list lock */ 115 rwlock_t ctl_files_rwlock; /* ctl_files list lock */
@@ -206,43 +207,13 @@ extern struct class *sound_class;
206 207
207void snd_request_card(int card); 208void snd_request_card(int card);
208 209
209int snd_register_device_for_dev(int type, struct snd_card *card, 210void snd_device_initialize(struct device *dev, struct snd_card *card);
210 int dev,
211 const struct file_operations *f_ops,
212 void *private_data,
213 const char *name,
214 struct device *device);
215 211
216/** 212int snd_register_device(int type, struct snd_card *card, int dev,
217 * snd_register_device - Register the ALSA device file for the card 213 const struct file_operations *f_ops,
218 * @type: the device type, SNDRV_DEVICE_TYPE_XXX 214 void *private_data, struct device *device);
219 * @card: the card instance 215int snd_unregister_device(struct device *dev);
220 * @dev: the device index
221 * @f_ops: the file operations
222 * @private_data: user pointer for f_ops->open()
223 * @name: the device file name
224 *
225 * Registers an ALSA device file for the given card.
226 * The operators have to be set in reg parameter.
227 *
228 * This function uses the card's device pointer to link to the
229 * correct &struct device.
230 *
231 * Return: Zero if successful, or a negative error code on failure.
232 */
233static inline int snd_register_device(int type, struct snd_card *card, int dev,
234 const struct file_operations *f_ops,
235 void *private_data,
236 const char *name)
237{
238 return snd_register_device_for_dev(type, card, dev, f_ops,
239 private_data, name,
240 snd_card_get_device_link(card));
241}
242
243int snd_unregister_device(int type, struct snd_card *card, int dev);
244void *snd_lookup_minor_data(unsigned int minor, int type); 216void *snd_lookup_minor_data(unsigned int minor, int type);
245struct device *snd_get_device(int type, struct snd_card *card, int dev);
246 217
247#ifdef CONFIG_SND_OSSEMUL 218#ifdef CONFIG_SND_OSSEMUL
248int snd_register_oss_device(int type, struct snd_card *card, int dev, 219int snd_register_oss_device(int type, struct snd_card *card, int dev,
diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h
index ae04a3ec9c77..ab9fcb2f97f0 100644
--- a/include/sound/hwdep.h
+++ b/include/sound/hwdep.h
@@ -68,8 +68,7 @@ struct snd_hwdep {
68 wait_queue_head_t open_wait; 68 wait_queue_head_t open_wait;
69 void *private_data; 69 void *private_data;
70 void (*private_free) (struct snd_hwdep *hwdep); 70 void (*private_free) (struct snd_hwdep *hwdep);
71 struct device *dev; 71 struct device dev;
72 const struct attribute_group **groups;
73 72
74 struct mutex open_mutex; 73 struct mutex open_mutex;
75 int used; /* reference counter */ 74 int used; /* reference counter */
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index cd09c1b05c24..44e9c2f2a094 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -447,6 +447,7 @@ struct snd_pcm_str {
447#endif 447#endif
448#endif 448#endif
449 struct snd_kcontrol *chmap_kctl; /* channel-mapping controls */ 449 struct snd_kcontrol *chmap_kctl; /* channel-mapping controls */
450 struct device dev;
450}; 451};
451 452
452struct snd_pcm { 453struct snd_pcm {
@@ -463,7 +464,6 @@ struct snd_pcm {
463 wait_queue_head_t open_wait; 464 wait_queue_head_t open_wait;
464 void *private_data; 465 void *private_data;
465 void (*private_free) (struct snd_pcm *pcm); 466 void (*private_free) (struct snd_pcm *pcm);
466 struct device *dev; /* actual hw device this belongs to */
467 bool internal; /* pcm is for internal use only */ 467 bool internal; /* pcm is for internal use only */
468 bool nonatomic; /* whole PCM operations are in non-atomic context */ 468 bool nonatomic; /* whole PCM operations are in non-atomic context */
469#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 469#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h
index 311dafe6cc4b..f6cbef78db62 100644
--- a/include/sound/rawmidi.h
+++ b/include/sound/rawmidi.h
@@ -28,6 +28,7 @@
28#include <linux/wait.h> 28#include <linux/wait.h>
29#include <linux/mutex.h> 29#include <linux/mutex.h>
30#include <linux/workqueue.h> 30#include <linux/workqueue.h>
31#include <linux/device.h>
31 32
32#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) 33#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
33#include <sound/seq_device.h> 34#include <sound/seq_device.h>
@@ -139,7 +140,8 @@ struct snd_rawmidi {
139 struct mutex open_mutex; 140 struct mutex open_mutex;
140 wait_queue_head_t open_wait; 141 wait_queue_head_t open_wait;
141 142
142 struct snd_info_entry *dev; 143 struct device dev;
144
143 struct snd_info_entry *proc_entry; 145 struct snd_info_entry *proc_entry;
144 146
145#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) 147#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)