aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 21:15:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-10 21:15:41 -0400
commit4ece92df296f472e49d26ee38ddbed4596458132 (patch)
tree0b2960114194d20769273dadb0bf2897c8e0206a /drivers/ide
parent75fcf64dc7180a6258dbefd671edb9d86a38d22f (diff)
parent1581208b2f0643eebfa7a3fbe5bad831c0bb7f0e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Pull IDE updates from David Miller: "Just a few small things: 1) module_platform_driver_probe() conversions from Jingoo Han. 2) module_pci_driver() conversion from Libo Chen. 3) PIO size calculation fix from Steven J Hill" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: ide: Fix IDE PIO size calculation drivers/ide/delkin_cb: Convert to module_pci_driver ide: gayle: use module_platform_driver_probe() ide: tx4939ide: use module_platform_driver_probe() ide: tx4938ide: use module_platform_driver_probe()
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/delkin_cb.c13
-rw-r--r--drivers/ide/gayle.c15
-rw-r--r--drivers/ide/ide-taskfile.c5
-rw-r--r--drivers/ide/tx4938ide.c13
-rw-r--r--drivers/ide/tx4939ide.c13
5 files changed, 6 insertions, 53 deletions
diff --git a/drivers/ide/delkin_cb.c b/drivers/ide/delkin_cb.c
index 7e27d3295e55..300daabaa575 100644
--- a/drivers/ide/delkin_cb.c
+++ b/drivers/ide/delkin_cb.c
@@ -173,18 +173,7 @@ static struct pci_driver delkin_cb_pci_driver = {
173 .resume = delkin_cb_resume, 173 .resume = delkin_cb_resume,
174}; 174};
175 175
176static int __init delkin_cb_init(void) 176module_pci_driver(delkin_cb_pci_driver);
177{
178 return pci_register_driver(&delkin_cb_pci_driver);
179}
180
181static void __exit delkin_cb_exit(void)
182{
183 pci_unregister_driver(&delkin_cb_pci_driver);
184}
185
186module_init(delkin_cb_init);
187module_exit(delkin_cb_exit);
188 177
189MODULE_AUTHOR("Mark Lord"); 178MODULE_AUTHOR("Mark Lord");
190MODULE_DESCRIPTION("Basic support for Delkin/ASKA/Workbit Cardbus IDE"); 179MODULE_DESCRIPTION("Basic support for Delkin/ASKA/Workbit Cardbus IDE");
diff --git a/drivers/ide/gayle.c b/drivers/ide/gayle.c
index 51beb85250d4..0a8440ae0565 100644
--- a/drivers/ide/gayle.c
+++ b/drivers/ide/gayle.c
@@ -183,20 +183,7 @@ static struct platform_driver amiga_gayle_ide_driver = {
183 }, 183 },
184}; 184};
185 185
186static int __init amiga_gayle_ide_init(void) 186module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
187{
188 return platform_driver_probe(&amiga_gayle_ide_driver,
189 amiga_gayle_ide_probe);
190}
191
192module_init(amiga_gayle_ide_init);
193
194static void __exit amiga_gayle_ide_exit(void)
195{
196 platform_driver_unregister(&amiga_gayle_ide_driver);
197}
198
199module_exit(amiga_gayle_ide_exit);
200 187
201MODULE_LICENSE("GPL"); 188MODULE_LICENSE("GPL");
202MODULE_ALIAS("platform:amiga-gayle-ide"); 189MODULE_ALIAS("platform:amiga-gayle-ide");
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 729428edeba2..dabb88b1cbec 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -239,9 +239,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
239 unsigned nr_bytes = min(len, cursg->length - cmd->cursg_ofs); 239 unsigned nr_bytes = min(len, cursg->length - cmd->cursg_ofs);
240 int page_is_high; 240 int page_is_high;
241 241
242 if (nr_bytes > PAGE_SIZE)
243 nr_bytes = PAGE_SIZE;
244
245 page = sg_page(cursg); 242 page = sg_page(cursg);
246 offset = cursg->offset + cmd->cursg_ofs; 243 offset = cursg->offset + cmd->cursg_ofs;
247 244
@@ -249,6 +246,8 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
249 page = nth_page(page, (offset >> PAGE_SHIFT)); 246 page = nth_page(page, (offset >> PAGE_SHIFT));
250 offset %= PAGE_SIZE; 247 offset %= PAGE_SIZE;
251 248
249 nr_bytes = min_t(unsigned, nr_bytes, (PAGE_SIZE - offset));
250
252 page_is_high = PageHighMem(page); 251 page_is_high = PageHighMem(page);
253 if (page_is_high) 252 if (page_is_high)
254 local_irq_save(flags); 253 local_irq_save(flags);
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index 91d49dd957ef..ede8575ac7d5 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -203,18 +203,7 @@ static struct platform_driver tx4938ide_driver = {
203 .remove = __exit_p(tx4938ide_remove), 203 .remove = __exit_p(tx4938ide_remove),
204}; 204};
205 205
206static int __init tx4938ide_init(void) 206module_platform_driver_probe(tx4938ide_driver, tx4938ide_probe);
207{
208 return platform_driver_probe(&tx4938ide_driver, tx4938ide_probe);
209}
210
211static void __exit tx4938ide_exit(void)
212{
213 platform_driver_unregister(&tx4938ide_driver);
214}
215
216module_init(tx4938ide_init);
217module_exit(tx4938ide_exit);
218 207
219MODULE_DESCRIPTION("TX4938 internal IDE driver"); 208MODULE_DESCRIPTION("TX4938 internal IDE driver");
220MODULE_LICENSE("GPL"); 209MODULE_LICENSE("GPL");
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index c0ab800b7bb3..4ecdee5eca83 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -624,18 +624,7 @@ static struct platform_driver tx4939ide_driver = {
624 .resume = tx4939ide_resume, 624 .resume = tx4939ide_resume,
625}; 625};
626 626
627static int __init tx4939ide_init(void) 627module_platform_driver_probe(tx4939ide_driver, tx4939ide_probe);
628{
629 return platform_driver_probe(&tx4939ide_driver, tx4939ide_probe);
630}
631
632static void __exit tx4939ide_exit(void)
633{
634 platform_driver_unregister(&tx4939ide_driver);
635}
636
637module_init(tx4939ide_init);
638module_exit(tx4939ide_exit);
639 628
640MODULE_DESCRIPTION("TX4939 internal IDE driver"); 629MODULE_DESCRIPTION("TX4939 internal IDE driver");
641MODULE_LICENSE("GPL"); 630MODULE_LICENSE("GPL");